doudou1309 2014-01-18 00:42
浏览 58
已采纳

goapp服务:找不到dev_appserver.py

using go 1.2 python 2.7 and appengine 1.8.9

dev_appserver.py works in dos box and is located in windows path.

goapp.exe also works in dos box and is located in windows path.

Any idea why goapp.exe serve does not work?

  • 写回答

1条回答 默认 最新

  • drbmhd9583 2014-01-19 10:09
    关注

    The goapp/serve.go which produces this error message ("unable to find dev_appserver.py") shows the following code:

    if p := os.Getenv("APPENGINE_DEV_APPSERVER"); p != "" {
      return p, nil
    }
    return "", fmt.Errorf("unable to find dev_appserver.py")
    

    So double-check if, when using goapp, APPENGINE_DEV_APPSERVER environment variable was actually set.
    See for instance this gotool.bat script which does set that variable
    (but dsymonds rightly points out that you should not set it directly, you should always use goapp):

    @echo off
    :: Copyright 2012 Google Inc. All rights reserved.
    :: Use of this source code is governed by the Apache 2.0
    :: license that can be found in the LICENSE file.
    setlocal
    set GOROOT=%~dp0\goroot
    set APPENGINE_DEV_APPSERVER=%~dp0\dev_appserver.py
    set GOARCH=
    set GOBIN=
    set GOOS=
    
    :: Set a GOPATH if one is not set.
    if not "%GOPATH%"=="" goto havepath
    set GOPATH=%~dp0\gopath
    :havepath
    
    %GOROOT%\bin\%~n0.exe %*
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器