我有一個文件結構如下所示:谷歌應用程序引擎(蟒蛇) - 導入失敗
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