Python 中 Google App Engine 的 dev_appserver.py 中出现 EOFError 错误
Posted
技术标签:
【中文标题】Python 中 Google App Engine 的 dev_appserver.py 中出现 EOFError 错误【英文标题】:EOFError error in dev_appserver.py for Google App Engine in python 【发布时间】:2018-06-20 09:55:47 【问题描述】:我在一个干净的虚拟环境中运行它,我的本地机器上的 lib 上没有安装任何模块。我已经准备好运行我的应用程序,但我无法启动 dev_appserver.py,我收到此错误
dev_appserver.py app.yaml
INFO 2018-06-20 11:24:01,578 devappserver2.py:120] Skipping SDK update check.
Traceback (most recent call last):
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 96, in <module>
_run_file(__file__, globals())
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 90, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 454, in <module>
main()
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 442, in main
dev_server.start(options)
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 197, in start
configuration.modules[0].application_root)
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\api_server.py", line 640, in create_api_server
if options.support_datastore_emulator else None)
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\stub_util.py", line 255, in setup_stubs
simple_search_stub.SearchServiceStub(index_file=search_index_path))
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\api\search\simple_search_stub.py", line 700, in __init__
self.Read()
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\api\search\simple_search_stub.py", line 1214, in Read
read_indexes = self._ReadFromFile()
File "C:\Users\aris\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\api\search\simple_search_stub.py", line 1188, in _ReadFromFile
version, indexes = pickle.load(open(self.__index_file, 'rb'))
EOFError
这些是谷歌云的版本,已更新到最新版本。我尝试像这里指定的那样更新 https://cloud.google.com/appengine/docs/standard/python/download 但它没有工作
gcloud --version
Google Cloud SDK 206.0.0
app-engine-python 1.9.70
app-engine-python-extras 1.9.69
beta 2018.06.12
bq 2.0.34
core 2018.06.18
gsutil 4.32
这是python的版本
python --version
Python 2.7.14
请问有什么帮助吗?
【问题讨论】:
【参考方案1】:这样解决了:
打开:
c:\users\your_pc_name\appdata\local\temp
删除目录名为:
appengine.your_app_name
【讨论】:
以上是关于Python 中 Google App Engine 的 dev_appserver.py 中出现 EOFError 错误的主要内容,如果未能解决你的问题,请参考以下文章
如何知道 Google App Engine(python)中实体的现有子项?
Google Cloud Tasks 和 Google App Engine Python 3
Google App Engine:在 Python 中使用自定义入口点
Python - Google App Engine - Django 模板中的方法