Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent mechanize update breaks script #218

tateMode opened this issue Mar 31, 2017 · 1 comment

Recent mechanize update breaks script #218

tateMode opened this issue Mar 31, 2017 · 1 comment


Copy link

tateMode commented Mar 31, 2017

PixivDownloader2 version 20170220
Donate at
Reading /opt/pixiv-downloader-20170220/config.ini ...
Traceback (most recent call last):
  File "", line 1902, in <module>
  File "", line 1779, in main
    __br__ = PixivBrowserFactory.getBrowser(config=__config__)
  File "/opt/pixiv-downloader-20170220/", line 515, in getBrowser
    _browser = PixivBrowser(defaultConfig, defaultCookieJar)
  File "/opt/pixiv-downloader-20170220/", line 35, in __init__
    mechanize.Browser.__init__(self, factory=mechanize.RobustFactory())
AttributeError: 'module' object has no attribute 'RobustFactory'

The script fails to start as per the error above. Tested with a fresh repository clone.

I run a Linux system and looking through my update log, I see that mechanize was recently updated from 0.2.5 to 0.3.1. Downgrading this package enabled the script to start up and log me in again. Haven't had a chance to test if the script can successfully download something after downgrading; there were a few other dependencies which recently received minor updates as well (numpy and imageio spring to mind).

Edit: Downloading still works after downgrading mechanize, so it's just mechanize that's the problem.

Copy link

Nandaka commented Apr 5, 2017

From their github:

Yes, as per the Changelog, mechanize.Browser does not accept the factory argument anymore. All HTML parsing is done using html5lib.

If you are using v3.x, you need to manually remove the factory parameter from

I need to check the compatibiliy before I've update the libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants