gpt4 book ai didi

python - 运行 Paster 时出现语法错误?

转载 作者:行者123 更新时间:2023-11-30 23:51:31 24 4
gpt4 key购买 nike

不知道发生了什么,但突然之间,粘贴器停止在我的服务器上工作(与 virtualenv 和 Pyramid 一起工作)。尝试重新安装所有内容,但没有成功 - 再次出现同样的错误:

Traceback (most recent call last):
File "bin/paster", line 7, in ?
sys.exit(
File "/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/command.py", line 83, in run
command = commands[command_name].load()
File "/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/serve.py", line 19, in ?
from paste.deploy import loadapp, loadserver
File "/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/PasteDeploy-1.5.0-py2.4.egg/paste/deploy/__init__.py", line 3, in ?
from paste.deploy.loadwsgi import *
File "/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/PasteDeploy-1.5.0-py2.4.egg/paste/deploy/loadwsgi.py", line 393
with open(filename) as f:
^
SyntaxError: invalid syntax

我这是怎么了?

最佳答案

您正在使用Python 2.4。它没有 with 语句。它仅出现在 Python 2.5 中。

更新您的 Python 版本。

关于python - 运行 Paster 时出现语法错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6729070/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com