我有一个在Linux上成功运行的简单测试代码,但它不能在我的Windows 10 x64计算机上运行.
当我试图开始一个芹菜工人时,它抱怨了不可恢复的错误:PicklingError.(芹菜版:3.1.20)
在我的celery配置中,我将序列化设置为'json',但它仍然没有任何帮助.
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']
Run Code Online (Sandbox Code Playgroud)
这是完整的错误消息:
[2016-02-09 15:11:48,532: ERROR/MainProcess] Unrecoverable error: PicklingError("Can't pickle <type 'module'>: it's not found as __builtin__.module",)
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\celery-3.1.20-py2.7.egg\celery\worker\__init__.py", line 206, in start
self.blueprint.start(self)
File "C:\Python27\lib\site-packages\celery-3.1.20-py2.7.egg\celery\bootsteps.py", line 123, in start
step.start(parent)
File "C:\Python27\lib\site-packages\celery-3.1.20-py2.7.egg\celery\bootsteps.py", line 374, in start
return self.obj.start()
File "C:\Python27\lib\site-packages\celery-3.1.20-py2.7.egg\celery\concurrency\base.py", line 131, in start
self.on_start()
File "C:\Python27\lib\site-packages\celery-3.1.20-py2.7.egg\celery\concurrency\prefork.py", line 117, in on_start
**self.options)
File "C:\Python27\lib\site-packages\billiard\pool.py", line 972, in __init__
self._create_worker_process(i)
File "C:\Python27\lib\site-packages\billiard\pool.py", line …Run Code Online (Sandbox Code Playgroud)