[英]Syntax Error when running Falcon Framework tutorial with gunicorn
Here is the stack trace: https://gist.github.com/guyjacks/a8e7cda23ed87a6900fd 这是堆栈跟踪: https : //gist.github.com/guyjacks/a8e7cda23ed87a6900fd
Here is the code: https://gist.github.com/guyjacks/3b3ca07fa62bd679cca3 这是代码: https : //gist.github.com/guyjacks/3b3ca07fa62bd679cca3
Installed packages: https://gist.github.com/guyjacks/8e582fcf5d19547dd729 安装的软件包: https : //gist.github.com/guyjacks/8e582fcf5d19547dd729
Python version: 3.2.5 on Mac OSX. Python版本:在Mac OSX上为3.2.5。
Virtualenv is activated so its not that! Virtualenv已激活,因此并非如此!
FYI, it works fine when using cpython 3.4.3. 仅供参考,使用cpython 3.4.3时效果很好。
The error message: 错误信息:
DEFAULT_ERROR_LOG_FORMAT = (u'{0:%Y-%m-%d %H:%M:%S} [FALCON] [ERROR]'
^
SyntaxError: invalid syntax
is pretty clear here. 在这里很清楚。 Python cannot make sense of the string.
Python无法理解字符串。
The u''
syntax for strings is only supported for Python 2 and Python >= 3.3. 仅Python 2和Python> = 3.3支持字符串的
u''
语法。 Python 3.2 is really old. Python 3.2确实很旧。 You need to upgrade your Python version.
您需要升级Python版本。 If possible, I would recommend to switch to Python 3.5 right away.
如果可能的话,我建议立即切换到Python 3.5。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.