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 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了
  • ¥100 H5网页如何调用微信扫一扫功能?
  • ¥15 讲解电路图,付费求解