在app.yaml或.yaml文件中查找错误

时间:2014-10-27 02:17:02

标签: google-app-engine google-cloud-sql

当我尝试将最新版本的应用部署到GAE时,它会给我一个错误。我所读到的是,我可能会使用Tabs而不是空格,但我不知道在哪里?如何通过日志找到错误的位置?

2014-10-26 21:58:46 Running command: "['C:\\Python27\\python.exe', '-u', 'C:\\Program Files    (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=email@gmail.com', '-- passin', '--server=clever-app.appspot.com', 'update', 'D:\\Documents\\app-spot Project\\wp39 - Copy']"
09:58 PM Application: clever-app; version: wpfromstarterproject-10262014
09:58 PM Host: clever-app.appspot.com

Traceback (most recent call last):
 File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 126, in <module>
run_file(__file__, globals())
 File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 122, in run_file
execfile(_PATHS.script_file(script_name), globals_)
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5400, in <module>
main(sys.argv)
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5391, in main
result = AppCfgApp(argv).Run()
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2981, in Run
self.action(self)
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 5047, in __call__
return method()
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3794, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3815, in _UpdateWithParsedAppYaml
updatecheck.CheckForUpdates()
 File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\sdk_update_checker.py", line 243, in CheckForUpdates
runtime=runtime))
 File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\__init__.py", line 82, in safe_load
return load(stream, SafeLoader)
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\__init__.py", line 66, in load
return loader.get_data()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\constructor.py", line 38, in get_data
return self.construct_document(self.get_node())
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\composer.py", line 27, in get_node
return self.compose_document()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\composer.py", line 37, in compose_document
self.get_event()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\parser.py", line 115, in get_event
self.current_event = self.state()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\parser.py", line 190, in parse_document_end
token = self.peek_token()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\scanner.py", line 128, in peek_token
self.fetch_more_tokens()
  File "C:\Program Files (x86)\Google\google_appengine\lib\yaml\lib\yaml\scanner.py", line 257, in fetch_more_tokens
% ch.encode('utf-8'), self.get_mark())

yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<string>", line 4, column 1:
        <meta charset="UTF-8" />
^
2014-10-26 21:58:52 (Process exited with code 1)

You can close this window now.

我已根据要求将app.yaml文件粘贴到此处:http://pastebin.com/geLGNKCY

1 个答案:

答案 0 :(得分:1)

等一下。这就是各种各样的怪异。我很抱歉我没有仔细阅读你的错误堆栈跟踪。

您的错误跟踪表明此处出现问题:https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/sdk_update_checker.py#235

但这是在检查SDK更新。这不应该失败。很奇怪!

您是否可以尝试使用--skip_sdk_update_check标记来调用appcfg.py,并确认在SDK检查过程中您所看到的内容是错误的?

错误是否可重复?

另外,从您的计算机上,如果您访问http://appengine.google.com/api/updatecheck,是否可以告诉我们您看到的内容?你碰巧有某种网络代理或防火墙吗?我确实猜测可能会做什么,因为我还没有理解错误。 (错误消息表明,您在某个意外的地方获得了HTML内容,所以有些奇怪。)