在开发环境中,它运行良好。但在部署到AppEngine之后,它就会中断。项目中包含必要的文件。
正在使用LEPL 5.1.3。
破损:
<type 'exceptions.SyntaxError'>: invalid syntax (parser.py, line 182)
Traceback (most recent call last):
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/controllers/main.py", line 26, in <module>
from controllers import users as Users
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/controllers/users.py", line 15, in <module>
from lepl.apps.rfc3696 import Email
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/lepl/__init__.py", line 113, in <module>
from lepl.contrib.matchers import SmartSeparator2
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/lepl/contrib/matchers.py", line 41, in <module>
from lepl.matchers.derived import Optional
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/lepl/matchers/derived.py", line 38, in <module>
from lepl.matchers.combine import And, DepthFirst, BreadthFirst, \
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/lepl/matchers/combine.py", line 45, in <module>
from lepl.matchers.core import Literal
File "/base/data/home/apps/s~roo-net/4-0.361574419262849513/lepl/matchers/core.py", line 44, in <module>
from lepl.core.parser import tagged
与appengine给出的此错误消息超级混淆。我看看parser.py中的第182行它看起来很好......很棒,甚至。非常漂亮的东西。
...
else:
if m_value: m_value.yield_(value)
yield value
# this allows us to restart with a new evaluation
# (backtracking) if called again.
value = main
except StopIteration as exception: # line 182
if exception_being_raised:
raise
# otherwise, we will propagate this value
value = exception
exception_being_raised = True
if m_value: m_value.exception(value)
...
答案 0 :(得分:1)
看起来您可能正在使用Python开发&gt; 2.5,但正在部署到Python 2.5。 (查看runtime
中的app.yaml
。 {2.5}之后出现as
的{{1}}语法。