You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have python code that uses mechanize to login to a website. With six==1.4.1 and six==1.10.0, I get this error:
Traceback (most recent call last):
File "scrapeRecipe.py", line 31, in <module>
br.select_form(name="aspnetForm")
File "/Library/Python/2.7/site-packages/mechanize/_mechanize.py", line 619, in select_form
global_form = self._factory.global_form
File "/Library/Python/2.7/site-packages/mechanize/_html.py", line 260, in global_form
self.forms()
File "/Library/Python/2.7/site-packages/mechanize/_html.py", line 267, in forms
self._current_forms, self._current_global_form = self._get_forms()
File "/Library/Python/2.7/site-packages/mechanize/_html.py", line 282, in _get_forms
if self.root is None:
File "/Library/Python/2.7/site-packages/mechanize/_html.py", line 247, in root
response, verify=False))
File "/Library/Python/2.7/site-packages/mechanize/_html.py", line 145, in content_parser
from html5lib import parse
File "/Library/Python/2.7/site-packages/html5lib/__init__.py", line 16, in <module>
from .html5parser import HTMLParser, parse, parseFragment
File "/Library/Python/2.7/site-packages/html5lib/html5parser.py", line 2, in <module>
from six import with_metaclass, viewkeys, PY3
ImportError: cannot import name viewkeys
This appears to similar to this post, except changing the version of six package didn't fix anything.
Activity
jakearchibald commentedon Jun 1, 2017
I'm also getting this error when trying to run Bikeshed
jakearchibald commentedon Jun 1, 2017
I "fixed" it by doing
yell0wd0g commentedon Jun 7, 2017
I got the same problem and the same solution, thanks @jakearchibald ! (+@tabatkins FYI)
Martin-Pitt commentedon Aug 14, 2017
Thanks @jakearchibald. I had the same problem but when installing Bikeshed for the first time on OSX. Seems to be working now with your solution.
tabatkins commentedon Aug 14, 2017
And I've updated the Bikeshed docs accordingly. Thanks!
Chronial commentedon Nov 10, 2017
This should already be fixed and is basically a duplicate of #301.
willkg commentedon Nov 10, 2017
@Chronial Awesome--thanks!