我查看了很多类似问题的答案,但好像无法找到错误在我的代码中发生的位置。当我尝试运行celery时出现错误:celery –A runLogProject worker –loglevel=INFO
。我已注释掉与Celery相关的所有代码,并且仍然出现相同的错误。我还尝试重新安装Celery。我不确定还应该尝试什么。以下是追踪信息:
C:\Python27\lib\site-packages\celery\bin\celery.py:803: UnicodeWarning: Unicode equal comparison failed to convert both
arguments to Unicode - interpreting them as being unequal
if len(argv) > 1 and 'worker' in argv[0:3]:
C:\Python27\lib\site-packages\celery\bin\celery.py:765: UnicodeWarning: Unicode equal comparison failed to convert both
arguments to Unicode - interpreting them as being unequal
if 'multi' in argv[1:3]: # Issue 1008
C:\Python27\lib\site-packages\celery\bin\base.py:398: UnicodeWarning: Unicode equal comparison failed to convert both ar
guments to Unicode - interpreting them as being unequal
if '--version' in argv:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\celery.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\celery\__main__.py", line 30, in main
main()
File "C:\Python27\lib\site-packages\celery\bin\celery.py", line 81, in main
cmd.execute_from_commandline(argv)
File "C:\Python27\lib\site-packages\celery\bin\celery.py", line 769, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "C:\Python27\lib\site-packages\celery\bin\base.py", line 304, in execute_from_commandline
argv = self.setup_app_from_commandline(argv)
File "C:\Python27\lib\site-packages\celery\bin\base.py", line 435, in setup_app_from_commandline
preload_options = self.parse_preload_options(argv)
File "C:\Python27\lib\site-packages\celery\bin\base.py", line 500, in parse_preload_options
return self.preparse_options(args, self.preload_options)
File "C:\Python27\lib\site-packages\celery\bin\base.py", line 512, in preparse_options
if arg.startswith('--'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 0: ordinal not in range(128)