billiard icon indicating copy to clipboard operation
billiard copied to clipboard

_subprocess error on windows with python 2.7

Open achNJ opened this issue 8 years ago • 7 comments

Hi !

I'm having an issue when with billard when called for a celery task and can't figure out why ... i suspect it to be related with the way the process are created on one side and opened on the other side .

here is the traceback:

Traceback (most recent call last):
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\worker\worker.py", line 203, in start
  self.blueprint.start(self)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\bootsteps.py", line 119, in start
  step.start(parent)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\bootsteps.py", line 370, in start
  return self.obj.start()
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\concurrency\base.py", line 131, in start
  self.on_start()
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\concurrency\prefork.py", line 112, in on_start
  **self.options)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\pool.py", line 1008, in __init__
  self._create_worker_process(i)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\pool.py", line 1117, in _create_worker_process
  w.start()
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\process.py", line 122, in start
  self._popen = self._Popen(self)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\context.py", line 383, in _Popen
  return Popen(process_obj)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\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 "<string>", line 1, in <module>
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
  new_handle = steal_handle(parent_pid, pipe_handle)
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\reduction.py", line 121, in steal_handle
  _winapi.PROCESS_DUP_HANDLE, False, source_pid)
WindowsError: [Error 87]

achNJ avatar Nov 15 '16 16:11 achNJ

I've had the same problem..。

ghostviper avatar Nov 16 '16 13:11 ghostviper

@ask what should we do??

RamolaWeb avatar Dec 27 '16 13:12 RamolaWeb

i met same problem

heloyue avatar Dec 30 '16 17:12 heloyue

I met the same problem on celery v4.0.2 in py 2.7.11

kaijianwang avatar Jan 13 '17 03:01 kaijianwang

It seems it's an official action that Windows is no longer supported since 4.x

kaijianwang avatar Jan 13 '17 03:01 kaijianwang

I think the reason is celery 4+ didn't work in windows, so i change the env

ghostviper avatar Jan 13 '17 03:01 ghostviper

Trying to use billiard (upgraded from 3.3.0.23 to 3.5.0.3) on windows, and can't get it to work, anyone has any input on this issue? i'm still seeing recent pull requests regarding windows support so i'm assuming windows is supposed to work?

linar-jether avatar Feb 13 '18 09:02 linar-jether