[issue35149] pip3 show causing Error for ConfigParaser

Karthikeyan Singaravelan report at bugs.python.org
Sun Apr 21 15:26:20 EDT 2019


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

I am able to reproduce this by explicitly setting PYTHONIOENCODING as ascii . But I am not sure about the defaults in Windows (related to your environment, os only?) and perhaps something has changed since 3.6 since it fails when executed under batch script or to close this as a pip related third party issue.

(py37-venv) ➜  cpython git:(master) ✗ PYTHONIOENCODING=ascii pip3 show ConfigParser
Name: configparser
Version: 3.7.4
Summary: Updated configparser from Python 3.7 for Python 2.6+.
Home-page: https://github.com/jaraco/configparser/
--- Logging error ---
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1036, in emit
    stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\u0141' in position 8: ordinal not in range(128)
Call stack:
  File "/Users/karthikeyansingaravelan/stuff/python/py37-venv/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/Users/karthikeyansingaravelan/stuff/python/py37-venv/lib/python3.7/site-packages/pip/_internal/__init__.py", line 78, in main
    return command.main(cmd_args)
  File "/Users/karthikeyansingaravelan/stuff/python/py37-venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 176, in main
    status = self.run(options, args)
  File "/Users/karthikeyansingaravelan/stuff/python/py37-venv/lib/python3.7/site-packages/pip/_internal/commands/show.py", line 47, in run
    results, list_files=options.files, verbose=options.verbose):
  File "/Users/karthikeyansingaravelan/stuff/python/py37-venv/lib/python3.7/site-packages/pip/_internal/commands/show.py", line 145, in print_results
    logger.info("Author: %s", dist.get('author', ''))
Message: 'Author: %s'
Arguments: ('\u0141ukasz Langa',)
Author-email: lukasz at langa.pl
License: UNKNOWN

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35149>
_______________________________________


More information about the Python-bugs-list mailing list