我使用Python 2.7和Google appengine来创建应用程序。当我尝试使用devappserver.py运行应用程序时出现以下错误。
from google.appengine.api import mail_stub
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\mail_stub.py", line 50, in <module>
class MailServiceStub(apiproxy_stub.APIProxyStub):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\mail_stub.py", line 223, in MailServiceStub
popen=subprocess.Popen,
AttributeError: 'module' object has no attribute 'Popen'
2015-04-16 16:35:43 (Process exited with code 1)
直到我将PYTHONPATH更改为google\google_appengine\lib\webob-1.1.1;
我该如何解决这个问题?
答案 0 :(得分:4)
Google App Engine沙箱不允许进行系统调用 - 包括Popen()。 https://cloud.google.com/appengine/docs/python/#Python_The_sandbox
答案 1 :(得分:2)
原始海报发现的解决方案是重新安装他的Python解释器,并解决任何错误配置错误。