我正在尝试在 appengine 上部署一个 go 应用程序并遵循本教程: https ://developers.google.com/appengine/docs/go/gettingstarted/helloworld?hl=de
但dev_appserver.py gopath/myapp/
导致这个奇怪的错误信息:
C:\Users\praktikant\Desktop\google_appengine>dev_appserver.py gopath/myapp/
INFO 2013-07-16 10:43:17,565 sdk_update_checker.py:244] Checking for updates
to the SDK.
INFO 2013-07-16 10:43:18,779 sdk_update_checker.py:288] This SDK release is
newer than the advertised release.
WARNING 2013-07-16 10:43:18,799 api_server.py:314] Could not initialize images
API; you are likely missing the Python "PIL" module.
INFO 2013-07-16 10:43:18,815 api_server.py:138] Starting API server at: http
://localhost:51413
INFO 2013-07-16 10:43:18,825 api_server.py:509] Applying all pending transac
tions and saving the datastore
INFO 2013-07-16 10:43:18,828 api_server.py:512] Saving search indexes
Traceback (most recent call last):
File "C:\Users\praktikant\Desktop\google_appengine\dev_appserver.py", line 182
, in <module>
_run_file(__file__, globals())
File "C:\Users\praktikant\Desktop\google_appengine\dev_appserver.py", line 178
, in _run_file
execfile(script_path, globals_)
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\devappserver2.py", line 695, in <module>
main()
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\devappserver2.py", line 688, in main
dev_server.start(options)
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\devappserver2.py", line 663, in start
self._dispatcher.start(apis.port, request_data)
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\dispatcher.py", line 161, in start
servr.start()
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\server.py", line 936, in start
self._watcher.start()
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\file_watcher.py", line 37, in start
watcher.start()
File "C:\Users\praktikant\Desktop\google_appengine\google\appengine\tools\deva
ppserver2\win32_file_watcher.py", line 74, in start
raise ctypes.WinError()
WindowsError: [Error 6] The handle is invalid
我的系统是windows 7,64位。我下载并解压缩了 go 版本 1.8.1 64 位的 google-appengine sdk。GOPATH 和 GOROOT 环境变量被创建并设置为解压后的 sdk 目录中的文件夹。我的 Python 是 2.7.5 64 位。
错误消息听起来像是与 python 相关,我在 stackoverflow 上发现了这个问题:Google App Engine 中的 Windows 错误
关于 stackoverflow 的普遍共识是 gae 版本 1.7.6 有一些错误,接受的答案建议降级回 1.7.5 。
但是今天当前的版本是 1.8.1。这是一个尚未修复的错误,还是我的配置有问题?如果问题与我的配置有关,我该如何解决?
更新: 更新检查器打印我使用的 sdk 版本比广告版本更新的信息。我从这里下载了 sdk:https ://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go
为什么来自谷歌服务器的版本比宣传的版本更新,我也很困惑。