我有一个文件结构如下所示:谷歌应用程序引擎(蟒蛇) - 导入失败
app.yaml
something/
__init__.py
models.py
test.py
我已经URL设置为运行tests.py
在app.yaml
:
...
- url: /test
script: something/test.py
test.py
进口models.py
当我尝试导航到http://myapp.appspot.com/test/
时,出现以下错误:
Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the > query that caused it
而且,当我检查仪表盘上的我看到下面的错误日志时:
<type 'exceptions.ImportError'>: No module named models
如何正确导入该文件?
干杯,
皮特
,如果你能告诉我们你的代码 - 我们可能会看到一些你可能会丢失。 – Glycerine 2010-11-20 23:48:50
当您在SDK中运行应用程序时会发生什么? – SingleNegationElimination 2010-11-21 01:08:34