在窗户上运行Django芹菜。 引发EOFError

我正在使用Windows 7 64位。 我安装了最新版本的台球,django芹菜和kombu。 包括我:

import djcelery djcelery.setup_loader() 

到我的项目setting.py

当我从我的项目的根目录运行以下内容:

 python manage.py celeryd -l info 

我收到以下消息(这是消息的最后一部分):

 File "c:\python27\lib\pickle.py", line 562, in save_tuple save(element) File "c:\python27\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "c:\python27\lib\pickle.py", line 548, in save_tuple save(element) File "c:\python27\lib\pickle.py", line 306, in save rv = reduce(self.proto) File "c:\python27\lib\site-packages\celery\app\base.py", line 412, in __reduce__ (self.__class__, self.Pickler) + self.__reduce_args__(), File "c:\python27\lib\site-packages\celery\app\base.py", line 422, in __reduce_args__ else self.conf._pickleable_changes()) File "c:\python27\lib\site-packages\celery\app\utils.py", line 77, in _pickleable_changes R.update(d) TypeError: 'LazySettings' object is not iterable C:\sources\tourtle>Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\python27\lib\site-packages\billiard\forking.py", line 530, in main self = load(from_parent) File "c:\python27\lib\pickle.py", line 1378, in load return Unpickler(file).load() File "c:\python27\lib\pickle.py", line 858, in load dispatch[key](self) File "c:\python27\lib\pickle.py", line 880, in load_eof raise EOFError EOFError 

我安装了MinGW,并将distutils.cfg添加到c:\ MinGW \ bin,但没有帮助

谢谢

在github上检查这个讨论:

https://github.com/celery/django-celery/issues/228

一个解决方法是,你用asksol在那里建议的方式改变celery / app / base.py(第418-419行)

从:

 conf = (self.conf.changes if _forking._forking_is_enabled else self.conf._pickleable_changes())' 

至:

 conf = (self.conf.changes if _forking._forking_is_enabled else {}) 

它应该工作得很好