python中Google App Engine的dev_appserver.py中的EOFError错误

时间:2018-06-20 09:55:47

标签: windows python-2.7 google-app-engine google-cloud-sdk

我在干净的虚拟环境中运行此程序,本地计算机上的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

这些是Google Cloud的版本,已更新为最新版本。我尝试按照此处指定的方式进行更新 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 个答案:

答案 0 :(得分:0)

解决方法如下:

打开:

c:\users\{your_pc_name}\appdata\local\temp

删除目录:

appengine.{your_app_name}