question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError installing legit from GitHub

See original GitHub issue

pip 1.5.4, python 2.7.6

> py -m pip install https://github.com/kennethreitz/legit
Downloading/unpacking https://github.com/kennethreitz/legit
Cleaning up...
Exception:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1197, in prepare_files
    do_download,
  File "C:\Python27\lib\site-packages\pip\req.py", line 1375, in unpack_url
    self.session,
  File "C:\Python27\lib\site-packages\pip\download.py", line 582, in unpack_http_url
    unpack_file(temp_location, location, content_type, link)
  File "C:\Python27\lib\site-packages\pip\util.py", line 627, in unpack_file
    and is_svn_page(file_contents(filename))):
  File "C:\Python27\lib\site-packages\pip\util.py", line 210, in file_contents
    return fp.read().decode('utf-8')
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
dstufftcommented, Mar 22, 2017

@pwaller it has an error message now:

$ pip install https://github.com/kennethreitz/legit
Collecting https://github.com/kennethreitz/legit
  Downloading https://github.com/kennethreitz/legit
     - 92kB 3.6MB/s
  Cannot unpack file /private/var/folders/14/9jkprxq17f30vp_2wbfw79780000gn/T/pip-QcRZcu-unpack/legit (downloaded from /private/var/folders/14/9jkprxq17f30vp_2wbfw79780000gn/T/pip-PJXNfN-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /private/var/folders/14/9jkprxq17f30vp_2wbfw79780000gn/T/pip-PJXNfN-build
0reactions
pwallercommented, Mar 22, 2017

@dstufft, even if the use case is bad, the error message is still not informative and confusing for anyone unfortunate enough to hit this accidentally. Is there any way that could be improved, perhaps by detecting that the content type is wrong, or something like this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnicodeDecodeError after nlp = English(data_dir ... - GitHub
Hello, I am using Anaconda Python 3.4 w Spyder on Mac Trying to go through the very first tutorial: from spacy.en import English, ......
Read more >
UnicodeDecodeError on pip install · Issue #833 - GitHub
I used to pull fastText with pip install git+git://github.com/facebookresearch/fastText.git which was working fine. Now it fails with: user@ ...
Read more >
Non-ascii error with pip install · Issue #2501 · pypa/pip - GitHub
Trying to use pip install but keep getting this message. Think it may have to do with ... UnicodeDecodeError with installing modules on...
Read more >
unicode error for non-ascii paths · Issue #1913 · pypa/pip
UnicodeDecodeError : 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128) Installing setuptools, pip...done.
Read more >
UnicodeDecodeError in setup.py / setup_win.bat · Issue ... - GitHub
At the moment I do not see a reliable encoding detection procedure available on basic installation of python2.7. I made a version which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found