New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError when requirements contains unicode #3548

Closed
chripede opened this Issue Mar 7, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@chripede

chripede commented Mar 7, 2016

  • Pip version: 8.1.0
  • Python version: 2.7.10
  • Operating System: Ubuntu 15.10

Description:

My requirements.txt file has a comment with a danish special char
ndg-httpsclient==0.4.0 # Sørger for at nye certifikater virker

pip started throwing errors after the upgrade to 8.1.0

What I've run:

pip install -r requirements.txt
Exception:
Traceback (most recent call last):
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/commands/install.py", line 287, in run
    wheel_cache
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/basecommand.py", line 289, in populate_requirement_set
    wheel_cache=wheel_cache):
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements
    filename, comes_from=comes_from, session=session
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/download.py", line 414, in get_file_content
    content = auto_decode(f.read())
  File "/home/hp/.virtualenvs/grank/local/lib/python2.7/site-packages/pip/utils/encoding.py", line 23, in auto_decode
    return data.decode(locale.getpreferredencoding(False))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1139: ordinal not in range(128)
@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Mar 7, 2016

Member

Hey! Could you by any chance try with the patch in #3547 and see if that fixes it for you?

Member

dstufft commented Mar 7, 2016

Hey! Could you by any chance try with the patch in #3547 and see if that fixes it for you?

@chripede

This comment has been minimized.

Show comment
Hide comment
@chripede

chripede Mar 7, 2016

@dstufft It did 👍 Thanks

chripede commented Mar 7, 2016

@dstufft It did 👍 Thanks

@chripede chripede closed this Mar 7, 2016

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