加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – Populate()不是可重入的Django Google App Engine

发布时间:2020-12-20 13:12:02 所属栏目:Python 来源:网络整理
导读:我正在运行谷歌应用引擎,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/pyth
我正在运行谷歌应用引擎,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.

但是,根据我登陆的谷歌群组线程,错误:

raise RuntimeError("populate() isn't reentrant")
  RuntimeError: populate() isn't reentrant

当您尝试加载的某个应用程序导致内部错误时,会导致此错误.我将在这里提供一个指向该主题的链接,虽然它与您的问题不同(您可能已经解决了它),但您仍可能发现它很有用:

Link到组线程

The answer我在谈论

希望你觉得它有用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读