Error adding format V0: 'module' object has no attribute 'ParseFile'
grantbevis opened this issue · 3 comments
Hi there,
After getting my instance working I'm now getting the following upon finding a release
Release found: <snip>
Release URL: <snip>
Formats needed: V0, 320
Adding format V0... Error adding format V0: 'module' object has no attribute 'ParseFile'
Adding format 320... Error adding format 320: 'module' object has no attribute 'ParseFile'
I believe it to be the same as issues #9 and #10 and running
import mechanize
print mechanize.__version__, ', '.join(mechanize.__dict__.keys())
Gives me
>>> import mechanize
>>> print mechanize.__version__, ', '.join(mechanize.__dict__.keys())
(0, 3, 6, None, None) HTTPRedirectDebugProcessor, HTTPResponseDebugProcessor, absolute_import, HTTPRedirectHandler, __path__, HTTPEquivProcessor, HiddenControl, IgnoreControl, _debug, _http, HTTPDefaultErrorHandler, FormNotFoundError, Browser, HTTPSClientCertMgr, urljoin, _equiv, __file__, urlretrieve, OpenerDirector, Control, CheckboxControl, CacheFTPHandler, _html, HTTPDigestAuthHandler, TextareaControl, HTTPEquivParser, ImageControl, _urllib2_fork, _gzip, AmbiguityError, Label, _mechanize, AbstractBasicAuthHandler, _urllib2, DefaultCookiePolicy, __all__, LocateError, _clientcookie, RadioControl, urlopen, TextControl, Link, ScalarControl, HTTPSHandler, FTPHandler, _response, LinkNotFoundError, __builtins__, MozillaCookieJar, __name__, __version__, _entities, CookieJar, _version, BrowserStateError, ControlNotFoundError, LoadError, html5_entities, _useragent, CookiePolicy, _opener, install_opener, SubmitButtonControl, __loader__, request_host, OpenerFactory, Cookie, HTTPRefreshProcessor, HTTPErrorProcessor, __doc__, HTTPPasswordMgrWithDefaultRealm, _form_controls, HTTPRobotRulesProcessor, HTTPHandler, _util, SubmitControl, logging, str2time, HTTPError, HTTPCookieProcessor, History, HTTPGzipProcessor, UserAgentBase, HTTPBasicAuthHandler, FileCookieJar, UnknownHandler, effective_request_host, RobotExclusionError, FileControl, ProxyBasicAuthHandler, HTTPRefererProcessor, build_opener, USE_BARE_EXCEPT, HTMLForm, _request, ProxyHandler, PasswordControl, BaseHandler, lwp_cookie_str, Factory, _form, _headersutil, ListControl, ItemNotFoundError, ContentTooShortError, SelectControl, Missing, FileHandler, HTTPPasswordMgr, __package__, UserAgent, LWPCookieJar, _sockettimeout, URLError, _rfc3986, ProxyDigestAuthHandler, seek_wrapped_response, _auth, AbstractDigestAuthHandler, Request, Item, SeekableResponseOpener, make_response, HTTPProxyPasswordMgr, response_seek_wrapper, ItemCountError
Kind regards,
b3vis
Something's up with installing the dependency modules with pip
. It's grabbing mechanize 0.3.6
when it should be grabbing 0.2.5
. Are you using pip install -r requirements.txt
or manually installing the modules using pip
? You should be using the former.
I was using the following method, not using pip;
git clone https://github.com/Mechazawa/REDBetter-crawler /tmp/REDBetter-crawler \
&& \
cd /tmp/REDBetter-crawler \
&& \
python setup.py install
I've fixed the versioning in setup.py and have submitted a PR here #22 . I personally prefer the python setup.py install
method as when building the docker container it installs redactedbetter
in the PATH.
@taylorthurlow you can see the docker image here