Search code examples
python-2.7flaskopenshiftflask-security

Flask Security - TemplateAssertionError: no filter named 'urlencode'


I just added flask-security to my flask project. It works locally, but reports this error on OpenShift:

TemplateAssertionError: no filter named 'urlencode'

I don't know if it is some wrong library version, or how to debug this. This is my setup.py package list:

install_requires=['Flask==0.10.1',
                    'SQLAlchemy==0.9.8',
                    'Flask-SQLAlchemy==2.0',
                    'Flask-Security==1.7.4',
                    'Werkzeug==0.9.5',
                    'blinker==1.3',
                    'Flask-Login==0.2.11',
                    'Flask-Mail==0.9.1',
                    'Flask-Principal==0.4.0',
                    'Flask-Script==2.0.5',
                    'Flask-WTF==0.10.3',
                    'itsdangerous==0.24',
                    'passlib==1.6.2'

  ]

Solution

  • I have solved this, by doing 'pip freeze' on my local machine, and copying libraries to setup.py one by one. Though I'm still not sure which one produced an error, probably wrong version of jinja2.