gpt4 book ai didi

django - 连接 django-rq : ImportError: cannot import name get_failed_queue 时出错

转载 作者:IT王子 更新时间:2023-10-29 06:12:29 27 4
gpt4 key购买 nike

从未使用过django-rqredis。我想这个问题应该很容易解决,但我不知道如何解决。

当我启动服务器时,出现此错误 ImportError: cannot import name get_failed_queue

我正在使用 Python 2.7

完整的追溯

Unhandled exception in thread started by <function wrapper at 0x7f8d45706410>
Traceback (most recent call last):
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
for pattern in resolver.url_patterns:
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/m0nte-cr1st0/work_projects/startapp/finbee/finbee/urls.py", line 27, in <module>
url(r'^admin/rq/', include('django_rq_dashboard.urls')),
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 52, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django_rq_dashboard/urls.py", line 3, in <module>
from . import views
File "/home/m0nte-cr1st0/.virtualenvs/finbee/local/lib/python2.7/site-packages/django_rq_dashboard/views.py", line 16, in <module>
from rq import Queue, Worker, get_failed_queue, push_connection
ImportError: cannot import name get_failed_queue

包裹 list

aenum                           2.1.2    
appdirs 1.4.3
asn1crypto 0.24.0
bcrypt 3.1.6
cached-property 1.5.1
certifi 2019.3.9
cffi 1.12.3
chardet 3.0.4
Click 7.0
croniter 0.3.30
cryptography 2.7
dbf 0.96.8
defusedxml 0.6.0
Django 1.9.13
django-admin-extensions 0.10.0
django-appconf 1.0.3
django-autocomplete-light 3.3.5
django-debug-toolbar 1.4
django-filebrowser-no-grappelli 3.7.8
django-flat-theme 1.1.4
django-imagekit 4.0.2
django-nested-inline 0.3.7
django-pipeline 1.6.12
django-rq 2.0 /home/m0nte-cr1st0/.virtualenvs/finbee/src/django-rq
django-rq-dashboard 0.3.0
django-selectable 0.9.0
django-static-sitemaps 4.2.1
django-tinymce 2.8.0
django-treebeard 4.3
django-uuslug 1.1.8
django-widget-tweaks 1.4.1
djlime 0.0.36 /home/m0nte-cr1st0/.virtualenvs/finbee/src/djlime/src
EasyProcess 0.2.7
enum34 1.1.6
Fabric 1.10.2
factory-boy 2.5.2
fake-useragent 0.1.5
html5lib 1.0.1
idna 2.8
ipaddress 1.0.22
isodate 0.6.0
lxml 3.7.1
paramiko 2.4.2
patool 1.12
pilkit 2.0
Pillow 6.0.0
pip 19.1.1
pkg-resources 0.0.0
psycopg2 2.8.2
pyasn1 0.4.5
pycparser 2.19
PyNaCl 1.3.0
python-dateutil 2.8.0
python-slugify 3.0.2
pytz 2019.1
pyunpack 0.1.2
redis 3.2.1
requests 2.22.0
requests-toolbelt 0.9.1
rq 1.0
rq-scheduler 0.6.0
setuptools 41.0.1
simplejson 3.16.0
six 1.12.0
sqlparse 0.3.0
text-unidecode 1.2
urllib3 1.25.3
webencodings 0.5.1
wheel 0.33.4
zeep 1.1.0

感谢关注

最佳答案

发生这种情况是因为您使用的 django-rq==2.0 需要 rq>=1.0。 rq==1.0 中不再存在函数 get_failed_queue(),请阅读发行说明以了解如何更改代码以使其再次运行:https://github.com/rq/rq/releases/tag/v1.0

否则,你可以降级到 django-rq==1.3.1 和 rq==0.13

关于django - 连接 django-rq : ImportError: cannot import name get_failed_queue 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56514980/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com