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?
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 %*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With