0
我已經第一次在我的ubuntu系統中設置了一個google appengine項目,並且通過閱讀所有可用的在線文檔使所有工作到現在爲止。但在這裏我已經卡住了,這是正確的本地主機上使用命令運行:dev_appserver.py app.yaml
但是當我試圖訪問我的瀏覽器我的應用程序,它拋出的錯誤:ImportError: No module named main
Python ImportError:如何解決Google Appengine項目中的「No module named main」?
Project Structure
-GAE_Demo
-google_appengine
-src
-handlers.py
-main.py
-app.yaml
-config.json
app.yaml
url: /.*
script: main.app
secure: always
src/main.py
app = webapp2.WSGIApplication(
routes=([('/main', MainHandler)]),
debug=True)
Error
INFO 2017-10-17 01:32:58,464 module.py:821] default: "GET/HTTP/1.1" 500 -
ERROR 2017-10-17 01:56:21,976 wsgi.py:263]
Traceback (most recent call last):
File "/home/path/to/project/GAE_Demo/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/home/path/to/project/GAE_Demo/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/home/path/to/project/GAE_Demo/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
ImportError: No module named main
在此先感謝!