Unicode error on ensurepip
I'm not sure this issue wasn't reported, but I couldn't find something that truly matched this behavior. I've downloaded pypy following the instructions. I'm running on Windows and trying to get pip to work (or at least venv):
Python 3.6.9 (d38cd66c14b8, Sep 23 2020, 08:02:17)
[PyPy 7.3.2 with MSC v.1927 32 bit] on win32
...\pypi3.6>pypy3.exe -m ensurepip
Looking in links: c:\...\AppData\Local\Temp\tmpf4gyyjbx
ERROR: Exception:
Traceback (most recent call last):
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\commands\install.py", line 331, in run
resolver.resolve(requirement_set)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\legacy_resolve.py", line 281, in _get_abstract_dist_for
req.populate_link(self.finder, upgrade_allowed, require_hashes)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\req\req_install.py", line 249, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\package_finder.py", line 899, in find_requirement
req.name, specifier=req.specifier, hashes=hashes,
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\package_finder.py", line 881, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\package_finder.py", line 814, in find_all_candidates
collected_links = self._link_collector.collect_links(project_name)
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\collector.py", line 509, in collect_links
self.find_links, expand_dir=True,
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\collector.py", line 407, in group_locations
sort_path(os.path.join(path, item))
File "C:\...\AppData\Local\Temp\tmpf4gyyjbx\pip-20.0.2-py2.py3-none-any.whl\pip\_internal\index\collector.py", line 388, in sort_path
if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
File "C:\...\pypy3.6\lib-python\3\mimetypes.py", line 290, in guess_type
init()
File "C:\...\pypy3.6\lib-python\3\mimetypes.py", line 351, in init
db.read_windows_registry()
File "C:\...\pypy3.6\lib-python\3\mimetypes.py", line 256, in read_windows_registry
for subkeyname in enum_types(hkcr):
File "C:\...\pypy3.6\lib-python\3\mimetypes.py", line 247, in enum_types
ctype = _winreg.EnumKey(mimedb, i)
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 0-1: illegal UTF-16 surrogate
I've tested with the Pypy 7.3.2 (Python 3.6) and Pypy 7.3.2-alpha0 (Python 3.7) with the same result. As you can expect, pypy3 -m venv nomatterwhat
doesn't work either.
Thanks for the help in understanding this issue,