AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'

243 views
Skip to first unread message

Dmitry Arsentiev

unread,
Aug 15, 2012, 7:33:56 AM8/15/12
to scrapy...@googlegroups.com
Hello.

Has anybody already meet the problem like this:
AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'

When I run scrapy, I get

File "/usr/local/lib/python2.7/site-packages/scrapy/selector/factories.py",
line 14, in <module>
libxml2.HTML_PARSE_NOERROR + \
AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'


When I run
python -c 'import libxml2; libxml2.HTML_PARSE_RECOVER'

I get
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'HTML_PARSE_RECOVER'

How can I cure it?

Python 2.7
libxml2-python 2.6.9
2.6.11-gentoo-r6


I will be grateful for any help.

Pablo Hoffman

unread,
Aug 22, 2012, 1:16:30 AM8/22/12
to scrapy...@googlegroups.com
You are using an old version of libxml2 (2.6.9) which doesn't work. Scrapy recommends 2.6.28 or above in the installation guide. Lower versions may still work but with defects, so I would just stick with 2.6.28 or above.


--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To post to this group, send email to scrapy...@googlegroups.com.
To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scrapy-users?hl=en.


Reply all
Reply to author
Forward
0 new messages