RuntimeWarning

RuntimeWarning: compiletime version 2.6 of module ‘lxml.etree’ does not match runtime version 2.7

 

Trying to make sure my bs4 (Beautifulsoup 4) and lxml are properly installed. They are in my system packages but as lxml is installed in python2.6, it does seem like I cannot use it properly with my Python2.7 environment.

Will need hosting to help sort this out for me since I cannot install lxml myself!

 

>>> import bs4
bs4/builder/_lxml.py:9: RuntimeWarning: compiletime version 2.6 of module 'lxml.etree' does not match runtime version 2.7
from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "bs4/builder/__init__.py", line 317, in <module>
from . import _lxml
File "bs4/builder/_lxml.py", line 9, in <module>
from lxml import etree
File "lxml.etree.pyx", line 167, in init lxml.etree (src/lxml/lxml.etree.c:192356)
TypeError: encode() argument 1 must be string without null bytes, not unicode
>>>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s