Skip to content

'NoneType' object has no attribute 'format' #38

Closed
@TheML9I

Description

If you use uwsgi with parameter optimize=2 you can get error with using it:

AttributeError at /mymodule/api/
'NoneType' object has no attribute 'format'

interpreter info:

Python Executable: /home/httpd/app/bin/uwsgi
Python Version: 2.7.5

additional:

-O Turn on basic optimizations. This changes the filename extension for compiled (bytecode) files from .pyc to .pyo. See also PYTHONOPTIMIZE.
-OO Discard docstrings in addition to the -O optimizations.

As possible solution add for py23compat.py

return s.format(u='u') if s else s

Any ideas?

Thnx!

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions