tyson-swetnam / porder

Simple CLI for Planet ordersV2 API
https://tyson-swetnam.github.io/porder/
Apache License 2.0
49 stars 12 forks source link

Missing import progressbar in async_down.py #27

Closed Imanflow closed 5 years ago

Imanflow commented 5 years ago

If you try to run porder multiproc it fails with:

Traceback (most recent call last):
  File "/home/ec2-user/.local/bin/porder", line 11, in <module>
    sys.exit(main())
  File "/home/ec2-user/.local/lib/python3.7/site-packages/porder/porder.py", line 359, in main
    args.func(args)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/porder/porder.py", line 229, in multiproc_from_parser
    downloader(url=args.url,final=args.local,ext=args.ext)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/porder/async_down.py", line 111, in downloader
    loop.run_until_complete(future)
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/ec2-user/.local/lib/python3.7/site-packages/porder/async_down.py", line 90, in get_data_asynchronous
    urllist=funct(url=url,final=final,ext=ext)
  File "/home/ec2-user/.local/lib/python3.7/site-packages/porder/async_down.py", line 66, in funct
    bar = progressbar.ProgressBar()
NameError: name 'progressbar' is not defined

Also, Pycharm marks sys in line 14 and time in line 68 as not imported.

samapriya commented 5 years ago

Hey @Imanflow Thanks for testing and reporting, fixed this and released v0.3.8. I am closing issue for now