You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(dbfs_env) dhankar@dhankar-1:~/.../torn$ python file_upload.py --put fl_2.txt --GOT Filenames --- ['fl_2.txt'] HTTP PUT - Upload fl_2.txt: Traceback (most recent call last): File "file_upload.py", line 202, in <module> asyncio.run(main()) File "/home/dhankar/anaconda3/envs/dbfs_env/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/dhankar/anaconda3/envs/dbfs_env/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "file_upload.py", line 194, in main tasks.add(method(filenames)) TypeError: '_asyncio.Future' object is not callable
The text was updated successfully, but these errors were encountered:
asyncdefmain():
""" Returns ------- None. """define("put", type=bool, help="Use PUT instead of POST", group="file uploader")
# Tornado configures logging from command line opts and returns remaining argsfilenames=options.parse_command_line()
ifnotfilenames:
print("Provide a list of filenames to upload.", file=sys.stderr)
sys.exit(1)
print("--GOT Filenames ---",filenames)
put_obj=Put(filenames)
post_obj=Post(filenames)
method=put_obj.run() ifoptions.putelsepost_obj.run()
# Main coroutine, starting tasks:cond=asyncio.Condition()
tasks=set()
tasks.add(method(filenames))
asyncio.gather(*(task.start(cond, tasks) fortaskintasks))
# Wait for the number of tasks to reach 0asyncwithcond:
awaitcond.wait_for(lambda: len(tasks) ==0)
print("ALL TASKS are COMPLETED, EXITING.")
asyncio.run(main())
Machine-Learning-with-Python_ML_Py/dev_tornado/file_upload.py
Line 168 in 21f489a
(dbfs_env) dhankar@dhankar-1:~/.../torn$ python file_upload.py --put fl_2.txt --GOT Filenames --- ['fl_2.txt'] HTTP PUT - Upload fl_2.txt: Traceback (most recent call last): File "file_upload.py", line 202, in <module> asyncio.run(main()) File "/home/dhankar/anaconda3/envs/dbfs_env/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/dhankar/anaconda3/envs/dbfs_env/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "file_upload.py", line 194, in main tasks.add(method(filenames)) TypeError: '_asyncio.Future' object is not callable
The text was updated successfully, but these errors were encountered: