Google App Engine开发服务器DatabaseError('数据库磁盘映像格式错误',)

时间:2017-06-16 17:57:46

标签: python google-app-engine google-cloud-datastore

我尝试使用本地开发服务器运行我的Google App Engine应用程序 我收到此错误:DatabaseError('数据库磁盘映像格式错误')

我认为数据库文件已损坏。 我跟着这个Stackoverflow post。我尝试删除/mytemporarydir/appengine.myproject.myuser处的临时文件,但我仍然遇到问题。

我也尝试使用选项--storage_path=...运行服务器。它可以运行(使用空数据存储区)但我需要sudo访问权限,当我停止服务器时(进程被阻止),数据库不会被保存。

我想一如既往地运行dev服务器,没有数据库错误,使用默认的storage_path且没有sudo

哪个文件可能已损坏,所以我将其删除?

编辑:我也尝试使用--clear_datastore选项运行服务器。 我使用的是Mac OSX

  

INFO 2017-06-16 17:35:01,122 recording.py:676]已保存;键:    appstats :001100,部分:40字节,完整:1682字节,开销:0.000 + 0.006;链接:http://localhost:8080/_ah/stats/details?time=1497634501114错误
  2017-06-16 17:35:01,130 api_server.py:374]处理时异常   service_name:" logservice"方法:" Flush"请求:   " \ n \ 255 \ 001 \ 022 \ 252 \ 001 \ 010 \ 357 \ 261 \ 305 \ 243 \ 363 \ 302 \ 324 \ 002 \ 020 \ 001 \ 032 \ 234 \ 001Saved;   key: appstats :001100,part:40字节,full:1682字节,开销:   0.000 + 0.006;链接:http://localhost:8080/_ah/stats/details?time=1497634501114"   request_id:" OVEehjkdik"

Traceback (most recent call last):
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 349, in _handle_POST
  api_response = _execute_request(request).Encode() 
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 225, in _execute_request
  make_request()
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 220, in make_request
  request_id)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/apiproxy_stub.py", line 129, in MakeSyncCall
  method(request, response, request_id)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/logservice/logservice_stub.py", line 203, in _Dynamic_Flush
  self._insert_app_logs(request_id, group.log_line_list())
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/apiproxy_stub.py", line 166, in WrappedMethod
  return method(self, *args, **kwargs)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/logservice/logservice_stub.py", line 214, in _insert_app_logs
  '(?, ?, ?, ?)', new_app_logs) 
DatabaseError: database disk image is malformed

RuntimeError("DatabaseError('database disk image is malformed',)",) 
Traceback (most recent call last):
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
  req.respond()
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
  self.server.gateway(self).respond()
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
  response = self.req.server.wsgi_app(self.env, self.start_response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 287, in __call__
  return app(environ, start_response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 314, in _rewriter_middleware
  response_body = iter(application(environ, wrapped_start_response))
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 159, in __call__ INFO     2017-06-16 17:35:01,137 module.py:809] default: "GET /admin/4785074604081152 HTTP/1.1" 500 -
  self._flush_logs(response.get('logs', []))
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 297, in _flush_logs
  apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 95, in MakeSyncCall
  return stubmap.MakeSyncCall(service, call, request, response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 329, in MakeSyncCall
  rpc.CheckSuccess()
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/api/apiproxy_rpc.py", line 157, in _WaitImpl
  self.request, self.response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 206, in MakeSyncCall
  self._MakeRealSyncCall(service, call, request, response)
File "/Users/arcano/Virtualenvs/muncommdsenv/muncommds/parts/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 269, in _MakeRealSyncCall
  raise pickle.loads(response_pb.exception()) 
RuntimeError: DatabaseError('database disk image is malformed',)

0 个答案:

没有答案