Skip to content Skip to sidebar Skip to footer

Syntax Error In A Python Library, And I'm Not Sure How To Proceed

I'm using pyramid 1.5.1 and python 3.2, and I just added quite a bit of code and a couple libraries to my project. On running development.ini, I'm getting the error below. If I had

Solution 1:

The MarkupSafe package uses syntax only supported by Python 3.3 and up. Python 3.2 is not supported anymore as of version 0.16.

The u'unicode' literal syntax was introduced in PEP 414 to make it easier to create library code that can support both Python 2 and 3.

Either upgrade to Python 3.3 (or 3.4 even), or downgrade MarkupSafe to 0.15, the last version to support Python 3.2.

I do see that Mako removes the MarkupSafe dependency when you are using Python 3.2; if nothing else depends on it is perhaps safe to remove the package altogether. The mako.filter source code certainly will fall back to a local implementation if the package is not installed.

Post a Comment for "Syntax Error In A Python Library, And I'm Not Sure How To Proceed"