Skip to content

Conversation

@gustavklopp
Copy link

… on the terminal, percentage of the current download display

… on the terminal, percentage of the current download display
@dessant
Copy link
Contributor

dessant commented Jul 25, 2015

Thanks a lot for this. It works with python 2, but it doesn't report the progress as it happens.
The file is dowloaded while Preparing to download http://github.com/kivy-garden/garden.cefpython/archive/master.zip ... is displayed, and after the download, the percentage counter just zips up to 100%.

On python 3, i get this:

Preparing to download http://github.com/kivy-garden/garden.cefpython/archive/master.zip ...
 Traceback (most recent call last):
   File "/home/vix/dev/venvs/py3/bin/garden", line 226, in <module>
     GardenTool().main(sys.argv[1:])
   File "/home/vix/dev/venvs/py3/bin/garden", line 84, in main
     options.func()
   File "/home/vix/dev/venvs/py3/bin/garden", line 140, in cmd_install
     fd = self.download(src_package)
   File "/home/vix/dev/venvs/py3/bin/garden", line 201, in download
     size = int(r.headers['Content-Length'].strip())
   File "/home/vix/dev/venvs/py3/lib/python3.4/site-packages/requests/structures.py", line 54, in __getitem__
     return self._store[key.lower()][1]
 KeyError: 'content-length'

@gustavklopp
Copy link
Author

It zaps to 100% without installing anything? (if you've already downloaded it -or the file is small-, I can't see the progress neither. In fact, the longer is for python-requests to "prepare" the download apparently)

About the error with no Key 'content-length', I've got sometimes the same problem after trying it several times.... Strange. Maybe a connection problem to download this big file? I've put a "try...except"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants