0

用这个命令

dev_appserver.py .

我正在尝试部署到本地服务器,但是它给了我一个错误:

INFO     2015-12-18 17:09:57,667 api_server.py:205] Starting API server at: http://localhost:51776
INFO     2015-12-18 17:09:57,678 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2015-12-18 17:09:57,681 admin_server.py:116] Starting admin server at: http://localhost:8000
Traceback (most recent call last):
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\_python_runtime.py", line 83, in <module>
    _run_file(__file__, globals())
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\_python_runtime.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 175, in <module>
    main()
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 155, in main
    sandbox.enable_sandbox(config)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 170, in enable_sandbox
    _install_fake_file(config, python_lib_paths, path_override_hook)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 252, in _install_fake_file
    stubs.FakeFile.set_skip_files(config.skip_files)
  File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\stubs.py", line 178, in set_skip_files
    FakeFile._skip_files = re.compile(skip_files)
  File "C:\python27\lib\re.py", line 190, in compile
    return _compile(pattern, flags)
  File "C:\python27\lib\re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: nothing to repeat

我试图重新安装 Google App Engine SDK 但仍然没有运气。知道为什么它不起作用吗?在我听了它并更新了 Cloud SDK 之前,它一直有效。

4

1 回答 1

1

您正在使用与 gcloud 捆绑在一起的 dev_appserver,它有时不是最新的。要绕过该问题,请按照https://cloud.google.com/appengine/downloads?hl=en上的说明下载并安装 GoogleAppEngine-1.9.30.msi - 并确保使用dev_appserver。此外,请在https://cloud.google.com/appengine/downloads?hl=engcloud components list打开关于gcloud-bundled dev_appserver 的错误报告(使用您在此处发布的相同信息以及您的确切操作系统和结果- 准确指出哪些组件有错误),谢谢。

(理论上,您观察到的错误可以用您的 app.yaml 中的错误skip_files节来解释,但如果是这种情况,那么它以前不应该与不同的 dev_appserver 版本一起工作)。

于 2015-12-18T23:46:29.990 回答