-
Notifications
You must be signed in to change notification settings - Fork 8
AttributeError: 'module' object has no attribute 'RobustFactory'` #8
Comments
Makes sense. Can you edit the code and try it? |
I'm sorry I don't have any programming skills - so I uninstalled mechanize 0.3.3 and installed 0.2.5 in order to get around this issue. I did minimal editing to the script in order to solve a BS4 warning and also to change domain name from amazon.com to amazon.es (my regional Amazon site) plus translating the "Exclsusive Vine Club" message and works beautifully apart from that, so thanks a lot for your work. May I ask you how do you actually "use" this script? Do you keep a terminal window opened and take a look at it from time to time? |
I run the script in a window that is minimized. When a new item appears, the script opens a web browser window. It's a bit annoying if I'm typing when the window appears, but it hasn't caused any real problems. I have plans to add an option for running an arbitrary script. |
That's actually the best behaviour I can think of. I don't want to impose on you, but I can't get the script to work with Firefox on a Mac (macOS 10.12.5, FireFox 53.0.3)
BeautifulSoup4 complained of not being able to load a default renderer, even when I installed 'pip install html5lib' so it's using lxml instead. When trying to run under
|
So the "session filename does not exist" is apparently something new in Firefox. You have to quit Firefox before starting amazon-vine.py, because apparently Firefox now creates the session file only after it quits. I will try to make a permanent fix later. However, the fact that the script works even without the session data makes it wonder whether Amazon fixed their web site so that I no longer need the session data in order to log in. As for bs4, try editing this line:
and change it to
|
Please note that in FireFox (on Mac) it only checks once for the item queue. I've modified the line and now on Windows I can use the latest version of mechanize without any warning. However, when trying on a Mac with FireFox it throws this output:
It's still unable to read session data from Chrome on a Mac, though. |
It looks like browsercookie has some bugs in it. I can try to debug them, but not any time soon. I filed a bug with browsercookie: https://bitbucket.org/richardpenman/browsercookie/issues/14/sessionstorejs-does-not-exist-if-firefox |
I get this output when running the script on Windows 10 x64 build 1703, python 2.7:
Using BeautifulSoup version 4.6.0 Using mechanize version 0.3.3 No handlers could be found for logger "root" Using fake_useragent version 0.1.7 Traceback (most recent call last): File "amazon-vine.py", line 454, in <module> br = login() File "amazon-vine.py", line 134, in login br = mechanize.Browser(factory = mechanize.RobustFactory()) AttributeError: 'module' object has no attribute 'RobustFactory'
May it be related to this issue?
python-mechanize/mechanize#5
The text was updated successfully, but these errors were encountered: