duaevb1511 2014-03-25 18:38
浏览 57
已采纳

转到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?

  • 写回答

3条回答 默认 最新

  • douchen2595 2014-03-26 05:18
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作