我使用pip install rq
安装了Python Redis队列模块
当我尝试使用rq
或rq worker
启动工作线程时,它抛出了一个错误。
PYTHONPATH=src REDIS_HOST=localhost rq worker --with-scheduler -u redis://localhost:6379
Traceback (most recent call last):
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\jason.bracket\AppData\Local\Programs\Python\Python37\Scripts\rq.exe\__main__.py", line 4, in <module>
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\rq\cli\__init__.py", line 2, in <module>
from .cli import main
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\rq\cli\cli.py", line 93, in <module>
@pass_cli_config
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\rq\cli\cli.py", line 72, in pass_cli_config
func = option(func)
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\click\decorators.py", line 247, in decorator
_param_memo(f, OptionClass(param_decls, **option_attrs))
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 2467, in __init__
super().__init__(param_decls, type=type, multiple=multiple, **attrs)
File "c:\users\jason.bracket\appdata\local\programs\python\python37\lib\site-packages\click\core.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
我正在Windows 10计算机上运行Python==3.7
和rq==1.7.0
。如何启动工作进程?是否需要配置任何内容?如有帮助,我们将不胜感激。
3条答案
按热度按时间bqjvbblv1#
问题出在
click
软件包上,您可能有8.0.0
版本。安装
click==7.1.2
,应该没问题。sy5wg1nm2#
使用此命令卸载“click”python模块的版本并安装特定版本。。但这是临时解决方案。
Linux和Windows的命令支持
7nbnzgx93#
解决方法:将单击固定为〈8.0。
pip install "click>=7,<8"