Skip to content
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

Unicode issues... again. #4050

Closed
quixadhal opened this issue Nov 1, 2016 · 2 comments
Closed

Unicode issues... again. #4050

quixadhal opened this issue Nov 1, 2016 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation C: encoding Related to text encoding and likely, UnicodeErrors

Comments

@quixadhal
Copy link

  • Pip version: 8.1.2
  • Python version: 3.5.2
  • Operating System: Windows 10 (Anniversary Update)

Description:

Just doing a simple "pip search sqlalchemy". I expected a list of packages, which I got... along with an error and traceback.

This is from git bash, whose locale is set to en_US.UTF-8. I assume from the argument at the bottom of the trace, that something about the package has invalid unicode in it... however, should there not be a default error trap (for character encoding) to catch such errors and either discard them, or make a concise notice so they can be reported without it causing further issues?

This was only a search operation, but I don't know if it actually output the whole list, or aborted when it hit the first "bad" chunk of data. If it does this during installation or upgrading, that's even worse.

What I've run:

% pip search sqlalchemy

SQLAlchemy-JSONAPI (4.0.8)                      - JSONAPI Mixin for SQLAlchemy
--- Logging error ---
Traceback (most recent call last):
  File "c:\program files\python35\lib\logging\__init__.py", line 982, in emit
    stream.write(msg)
  File "c:\program files\python35\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 141, in write
    self.write_and_convert(text)
  File "c:\program files\python35\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 169, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "c:\program files\python35\lib\site-packages\pip\_vendor\colorama\ansitowin32.py", line 174, in write_plain_text
    self.wrapped.write(text[start:end])
  File "c:\program files\python35\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 50-52: character maps to <undefined>
Call stack:
  File "c:\program files\python35\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python35\Scripts\pip.exe\__main__.py", line 9, in <module>
    sys.exit(main())
  File "c:\program files\python35\lib\site-packages\pip\__init__.py", line 221, in main
    return command.main(cmd_args)
  File "c:\program files\python35\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\program files\python35\lib\site-packages\pip\commands\search.py", line 50, in run
    print_results(hits, terminal_width=terminal_width)
  File "c:\program files\python35\lib\site-packages\pip\commands\search.py", line 128, in print_results
    logger.info(line)
Message: 'py_sql_ext (0.1)                                - \u6269\u5c55\u4e86SqlAlchemy,\u652f\u6301\u58f0\u660e\u5f0f\u4e8b\u52a1\u548c\u624b\u5199SQL'
Arguments: ()
@xavfernandez xavfernandez added the C: encoding Related to text encoding and likely, UnicodeErrors label Mar 27, 2017
@pfmoore
Copy link
Member

pfmoore commented May 27, 2017

This should now be fixed by #4486, which is now available in the development version of pip and will be released in pip 10. I am closing this issue, but if you are still able to reproduce the problem in the development version of pip, please reopen it with a description of now to replicate the issue.

@xavfernandez
Copy link
Member

I agree with @pfmoore and I'm really closing this issue ;)

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: encoding Related to text encoding and likely, UnicodeErrors
Projects
None yet
Development

No branches or pull requests

3 participants