我正在运行 google app engine、python 2.7,并导入 Django 1.8。拉入 python-firebase (-e git://github.com/ozgur/python-firebase.git#egg=python-firebase) 后,出现以下错误
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/base/data/home/apps/s~trac-us/1.392706776803493304/main.py", line 25, in <module>
application = django.core.wsgi.get_wsgi_application()
File "/base/data/home/apps/s~trac-us/1.392706776803493304/libs/django/core/wsgi.py", line 14, in get_wsgi_application
django.setup()
File "/base/data/home/apps/s~trac-us/1.392706776803493304/libs/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/base/data/home/apps/s~trac-us/1.392706776803493304/libs/django/apps/registry.py", line 78, in populate
raise RuntimeError("populate() isn't reentrant")
RuntimeError: populate() isn't reentrant
许多其他解决方案建议更改 wsgi.py 文件,因为 django 在 requirements.txt 文件中部署之前就已安装。
最终这会导致服务器声明:“错误:服务器错误 服务器遇到错误,无法完成您的请求。 请在 30 秒后重试。”我该如何解决?
最佳答案
我遇到了同样的问题,删除了 sqlite 数据库连接的数据库配置为我解决了这个问题。问题可能是 django 在下面寻找的 sqlite 库不存在,因此删除 sqlite 配置为我解决了这个问题。 pff,我在那个项目中没有以任何方式使用 sqlite。
但是,根据我登陆的一个 google groups 线程,错误:
raise RuntimeError("populate() isn't reentrant")
RuntimeError: populate() isn't reentrant
是由于您尝试加载的应用程序之一导致其中的错误而导致的。我将在此处提供线程的链接,尽管它与您的问题不同(您可能已经解决了),但您可能仍然会发现它很有用:
Link到组线程
The answer我在说
希望你觉得它有用。
关于python - Populate() 不是可重入的 Django Google App Engine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37154883/