Message341398
Could it be a problem with pip and it's vendored html5lib version incompatibility? There is one bug report in pip repo about Anaconda patching pip that seems to cause this error : https://github.com/pypa/pip/issues/4902 .
Can you please share the pip and python version to see if I can reproduce this? Is the pip being used part of the one at 3.6 release?
./venv/bin/pip --version
I am using Python 3.6.4 from homebrew. I can reproduce this is by manually editing ./venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py and removing transport_encoding from HTMLBinaryInputStream's constructor.
./venv/lib/python3.6/site-packages/pip/_vendor/html5lib/__init__.py contains the version number of html5lib. Mine is 1.0b10.
Sample error I got similar to the report :
➜ Doc git:(master) ✗ ./venv/bin/pip install sphinx
Collecting sphinx
Exception:
Traceback (most recent call last):
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 731, in __init__
namespaceHTMLElements=False,
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 35, in parse
return p.parse(doc, **kwargs)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 235, in parse
self._parse(stream, False, None, *args, **kwargs)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 85, in _parse
self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_tokenizer.py", line 36, in __init__
self.stream = HTMLInputStream(stream, **kwargs)
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py", line 151, in HTMLInputStream
return HTMLBinaryInputStream(source, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'transport_encoding'
You are using pip version 9.0.1, however version 19.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. |
|
Date |
User |
Action |
Args |
2019-05-04 19:14:00 | xtreak | set | recipients:
+ xtreak, brett.cannon, pitrou, ned.deily, docs@python, mdk |
2019-05-04 19:14:00 | xtreak | set | messageid: <1556997240.05.0.663375926626.issue36795@roundup.psfhosted.org> |
2019-05-04 19:14:00 | xtreak | link | issue36795 messages |
2019-05-04 19:13:59 | xtreak | create | |
|