作者:手机用户2602885151 | 来源:互联网 | 2023-10-13 12:34
我使用安装了 Python Redis Queue 模块 pip install rq
当我尝试使用rq
or启动工作程序时rq worker
,它会引发错误。
PYTHOnPATH=src REDIS_HOST=localhost rq worker --with-scheduler -u redis://localhost:6379
Traceback (most recent call last):
File "c:usersjason.bracketappdatalocalprogramspythonpython37librunpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:usersjason.bracketappdatalocalprogramspythonpython37librunpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:Usersjason.bracketAppDataLocalProgramsPythonPython37Scriptsrq.exe__main__.py", line 4, in
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesrqcli__init__.py", line 2, in
from .cli import main
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesrqclicli.py", line 93, in
@pass_cli_config
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesrqclicli.py", line 72, in pass_cli_config
func = option(func)
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesclickdecorators.py", line 247, in decorator
_param_memo(f, OptionClass(param_decls, **option_attrs))
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesclickcore.py", line 2467, in __init__
super().__init__(param_decls, type=type, multiple=multiple, **attrs)
File "c:usersjason.bracketappdatalocalprogramspythonpython37libsite-packagesclickcore.py", line 2108, in __init__
) from None
ValueError: 'default' must be a list when 'multiple' is true.
make: *** [Makefile:50: start-worker-native] Error 1
我正在运行Python==3.7
并rq==1.7.0
在 Windows 10 机器上运行。我怎样才能开始工作?我需要配置什么吗?任何帮助,将不胜感激。
回答
问题是click
包裹。你可能有这个8.0.0
版本。
安装click==7.1.2
,应该没问题。