lxml installed, no attribute error again!

So my hosting has very kindly installed lxml for Python 2.7 for me.

That fixed my problem of having a mismatched version error and the error with no tree builder found.


There is however, still an error with my BlogPageIndex having an AttributeError that only shows up as ‘cannot save draft due to errors’ on my Wagtail interface.

also had the embarrassment of pronouncing Django wrong in a conversation. That quite possibly caused me Internal System Error with missing module ‘shy’.


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


In the process of removing the AttributeError in my Wagtail admin page, I added ‘django_libsass’ to my INSTALLED_APPS* in settings.py


Now I’m in admin and trying to create a basic blog, but bumped against 

FeatureNotFound at /admin/pages/new/wagweb/blogpage/2/

Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Wagtail uses their own tree builder called django-treebeard. The app is installed and can be found in my directory within Wagtail >  Vendor. 

Will try to list it under INSTALLED_APPS and see if it works.

Nope it doesn’t work.

*(correction I have removed django_libsass and nothing broke, so I’m leaving it that way to reduce unnecessary fluff)