2014-03-25 18:38

转到GAE错误:找不到'__main__'模块(Win 8.1)


I am trying to set up Google App Engine for Go; I'm following the Google tutorial, but when I go to serve my app (goapp serve) I get the following error:

C:\Python27\python.exe: can't find '__main__' module in 'C:\\Program Files (x86)
\\Google\\go_appengine' error while running go_appengine: exit status 1

I don't know if the double slashes are an issue. My "APPENGINE_DEV_APPSERVER" env var is set as "C:\Program Files (x86)\Google\go_appengine", which is where dev_appserver.py is located.

I'm using Go GAE 64-bit on 64-bit Win 8.1. I have 32-bit Python 2.7 installed (as I mostly use GAE Python). I have tried setting up my Workspace using the "How to Write Go Code" tutorial, but I'm confused about how this relates to GAE Go. I have also created a blank "main.py" in the dir, and the error goes away, but the app doesn't serve a page.

Any suggestions?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • douchen2595 douchen2595 7年前

    What instructions are you following? When you try to run go_appengine it doesn't have main . In order to deploy the app run dev_appserver.py

    More instructions here - https://developers.google.com/appengine/docs/go/tools/devserver

    点赞 评论 复制链接分享
  • doufangxian4985 doufangxian4985 5年前

    set your PATH environment variable

    APPENGINE_DEV_APPSERVER = your_go_appengine_path\dev_appserver.py

    then it should work

    点赞 评论 复制链接分享
  • dongyan7876 dongyan7876 7年前


    点赞 评论 复制链接分享