问题:报错 Unrecoverable error: TypeError('argument 1 must be an integer, not _subprocess_ha ndle',)

[2019-05-14 14:00:28,326: CRITICAL/MainProcess] Unrecoverable error: TypeError('argument 1 must be an integer, not _subprocess_ha
ndle',)
Traceback (most recent call last):
  File "e:\python2.7\lib\site-packages\celery\worker\worker.py", line 203, in start
    self.blueprint.start(self)
  File "e:\python2.7\lib\site-packages\celery\bootsteps.py", line 119, in start
    step.start(parent)
  File "e:\python2.7\lib\site-packages\celery\bootsteps.py", line 370, in start
    return self.obj.start()
  File "e:\python2.7\lib\site-packages\celery\concurrency\base.py", line 131, in start
    self.on_start()
  File "e:\python2.7\lib\site-packages\celery\concurrency\prefork.py", line 112, in on_start
    **self.options)
  File "e:\python2.7\lib\site-packages\billiard\pool.py", line 1008, in __init__
    self._create_worker_process(i)
  File "e:\python2.7\lib\site-packages\billiard\pool.py", line 1117, in _create_worker_process
    w.start()
  File "e:\python2.7\lib\site-packages\billiard\process.py", line 122, in start
    self._popen = self._Popen(self)
  File "e:\python2.7\lib\site-packages\billiard\context.py", line 383, in _Popen
    return Popen(process_obj)
  File "e:\python2.7\lib\site-packages\billiard\popen_spawn_win32.py", line 64, in __init__
    _winapi.CloseHandle(ht)
TypeError: argument 1 must be an integer, not _subprocess_handle
Traceback (most recent call last):
  File "", line 1, in 
  File "e:\python2.7\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "e:\python2.7\lib\site-packages\billiard\reduction.py", line 126, in steal_handle
    _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
WindowsError: [Error 6]

使用Celery,启动的时候报错

问题:报错 Unrecoverable error: TypeError('argument 1 must be an integer, not _subprocess_ha ndle',)_第1张图片

具体原因是由于windows不支持celery4.0版本

可以把celery换成3.0版本

 

你可能感兴趣的:(python项目开发,Celery)