django-celery管理命令给出AttributeError:'_ multiultipping.SemLock'对象没有属性'name'

时间:2012-10-04 11:23:00

标签: python django django-celery kombu

我想向管理员发送通知电子邮件,例如,如果发布了帖子,那么管理员应该收到电子邮件。 我正在使用django-celery templated_email和kombu。 但是当我运行djcelery的任何管理命令时出现错误

D:\ test \ testapp> python manage.py celeryd -l info      C:\ Python27 \ LIB \站点包\ django_celery-3.0.4-py2.7.egg \ djcelery \ loaders.py:116:
      UserWarning:使用settings.DEBUG导致内存泄漏,n       warnings.warn(“使用settings.DEBUG导致内存泄漏,永远不会”

 -------------- celery@Siddhatech_A-PC v3.0.4 (Chiastic Slide)
  ---- **** -----
 --- * ***  * -- [Configuration]
 -- * - **** --- . broker:      djkombu.transport.DatabaseTransport://localhost//
 - ** ---------- . app:         default:0x28c3390 (djcelery.loaders.DjangoLoader)
 - ** ---------- . concurrency: 4 (processes)
 - ** ---------- . events:      OFF (enable -E to monitor this worker)
 - ** ----------
 - *** --- * --- [Queues]
 -- ******* ---- . celery:      exchange:celery(direct) binding:celery
 --- ***** ----- . email:       exchange:celery(direct) binding:email

  [Tasks]
    . djcelery_email_send
    . testapp.tasks.add

Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-billiard\forking.py", line 496, 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
   [2012-10-04 14:45:25,960: ERROR/MainProcess]Unrecoverable error:AttributeError("'_multiprocessing.SemLock' object has no attribute 'name'",)
   Traceback (most recent call last):
   File "C:\Python27\lib\site-packages\celery-3.0.4-py2.7.egg\celery\worker\__init__.py", line 348, in start
   component.start()
   File "C:\Python27\lib\site-packages\celery-3.0.4-py2.7.egg\celery\concurrency\base.py", line 109, in start
   self.on_start()
   File "C:\Python27\lib\site-packages\celery-3.0.4-py2.7.egg\celery\concurrency\processes\__init__.py", line 84, in on_start
   **self.options)
   File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-win32.egg\billiard\pool.py", line 799, in __init__
   self._create_worker_process()
   File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-win32.egg\billiard\pool.py", line 867, in _create_worker_process
   w.start()
   File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-win32.egg\billiard\process.py", line 138, in start
   self._popen = Popen(self)
   File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-win32.egg\billiard\forking.py", line 350, in __init__
   dump(process_obj, to_child, HIGHEST_PROTOCOL)
   File "C:\Python27\lib\site-packages\billiard-2.7.3.10-py2.7-win32.egg\billiard\forking.py", line 143, in dump
   ForkingPickler(file, protocol).dump(obj)
   File "C:\Python27\lib\pickle.py", line 224, in dump
   self.save(obj)
   File "C:\Python27\lib\pickle.py", line 331, in save
   self.save_reduce(obj=obj, *rv)
   File "C:\Python27\lib\pickle.py", line 419, in save_reduce
   save(state)
   File "C:\Python27\lib\pickle.py", line 286, in savef(self, obj) # Call unbound method with explicit self
   File "C:\Python27\lib\pickle.py", line 649, in save_dict
   self._batch_setitems(obj.iteritems())
   File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
   save(v)
   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 562, in save_tuple
   save(element)
   File "C:\Python27\lib\pickle.py", line 331, in save
   self.save_reduce(obj=obj, *rv)
   File "C:\Python27\lib\pickle.py", line 419, in save_reduce
   save(state)
   File "C:\Python27\lib\pickle.py", line 286, in save if(self, obj) # Call unbound method with explicit self
   File "C:\Python27\lib\pickle.py", line 562, 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\billiard-2.7.3.10-py2.7-win32.egg\billiard\synchronize.py", line 122, in __getstate__
   sl.name)
   AttributeError: '_multiprocessing.SemLock' object has no attribute 'name'
   dispatch[key](self)
   File "C:\Python27\lib\pickle.py", line 880, in load_eof
   raise EOFError
   EOFError
   [2012-10-04 14:45:26,299: INFO/MainProcess] process shutting down

提前致谢

1 个答案:

答案 0 :(得分:0)

请升级到芹菜3.0.11,特别是最新的台球版,因为最近修复了这个Windows特定的错误