Go appengine示例抛出异常

huangapple go评论81阅读模式
英文:

Go appengine examples throw exceptions

问题

我无法使随app-engine软件包一起提供的go示例工作。

根据文档,我应该能够运行以下命令:

cd google_appengine
dev_appserver.py helloworld

一切似乎都正常启动,如下终端输出所示:

WARNING  2012-10-01 04:32:09,023 rdbms_mysqldb.py:74] The rdbms API is not available     because the MySQLdb library could not be loaded.
INFO     2012-10-01 04:32:09,077 appcfg.py:585] Checking for updates to the SDK.
INFO     2012-10-01 04:32:09,728 appcfg.py:603] The SDK is up to date.
INFO     2012-10-01 04:32:09,746 dev_appserver_multiprocess.py:655] Running application dev~helloworld on port 8080: http://localhost:8080
INFO     2012-10-01 04:32:09,746 dev_appserver_multiprocess.py:657] Admin console is available at: http://localhost:8080/_ah/admin

但是,当我尝试在localhost:8080上查看提供的页面时,我得到以下错误:

<type 'exceptions.Exception'>: ('no .go files in %s', '/home/chris/.google_appengine/demos/helloworld') 
  args = ('no .go files in %s', '/home/chris/.google_appengine/demos/helloworld') 
  message = ''

这是正确的,demos/helloworld中没有go文件,而是在demos/helloworld/helloworld中(这是它们的文件夹结构,不是我的)。我尝试将文件移动到父文件夹,但那样不起作用。

这是go(1.0.3)和appengine的全新安装。

顺便说一句,这对于演示文件夹中的所有示例都发生。

有什么想法吗?

英文:

I am unable to get the go examples working that come with the app-engine package.

According to the docs I should be able to run:

cd google_appengine
dev_appserver.py helloworld

Everything seems to startup fine as shown by the below terminal output:

WARNING  2012-10-01 04:32:09,023 rdbms_mysqldb.py:74] The rdbms API is not available     because the MySQLdb library could not be loaded.
INFO     2012-10-01 04:32:09,077 appcfg.py:585] Checking for updates to the SDK.
INFO     2012-10-01 04:32:09,728 appcfg.py:603] The SDK is up to date.
INFO     2012-10-01 04:32:09,746 dev_appserver_multiprocess.py:655] Running application dev~helloworld on port 8080: http://localhost:8080
INFO     2012-10-01 04:32:09,746 dev_appserver_multiprocess.py:657] Admin console is available at: http://localhost:8080/_ah/admin

But when I try to view the page being served on localhost:8080 I get:

<type 'exceptions.Exception'>: ('no .go files in %s', '/home/chris/.google_appengine/demos/helloworld') 
  args = ('no .go files in %s', '/home/chris/.google_appengine/demos/helloworld') 
  message = ''

This is correct there are no go files in demos/helloworld, but are instead in demos/helloworld/helloworld (this is their folder structure not mine). I tried just moving the file to the parent folder, but that doesn't work.

This is a fresh install of go (1.0.3) and appengine.

BTW this happens for all the examples in the demo folder.

Any ideas?

答案1

得分: 2

你试过这个吗?

cd google_appengine
./dev_appserver.py demos/helloworld
英文:

did you try this?

cd google_appengine
./dev_appserver.py demos/helloworld

huangapple
  • 本文由 发表于 2012年10月1日 12:43:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/12667613.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定