Celery error 37?

256 views
Skip to first unread message

commis...@gmail.com

unread,
Jan 6, 2017, 10:58:38 AM1/6/17
to OpenREM
I am trying to get Celery running on an new OpenREM install and I keep getting the following:

---- **** -----
--- * *** * -- Windows-7-6.1.7601-SP1 2017-01-06 10:57:30
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: openremproject:0x37935d0
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> default exchange=default(direct) key=default



C:\Python27\Lib\site-packages\openrem>Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\python27\lib\site-packages\billiard\spawn.py", line 159, in spawn_mai
n
new_handle = steal_handle(parent_pid, pipe_handle)
File "c:\python27\lib\site-packages\billiard\reduction.py", line 121, in steal
_handle
_winapi.PROCESS_DUP_HANDLE, False, source_pid)
WindowsError: [Error 87] The parameter is incorrect


Has anyone seen this?

Ed McDonagh

unread,
Jan 6, 2017, 11:40:57 AM1/6/17
to commis...@gmail.com, OpenREM
Are you using Celery 4.0? It appears that Celery have removed support for Windows! See http://docs.celeryproject.org/en/latest/whatsnew-4.0.html#removed-features

For your issue, please downgrade to Celery 3.x. This will be along the lines of pip install celery==3.1

For the future of OpenREM on Windows - I'm not sure. I specifically chose Celery and RabbitMQ so that OpenREM would have equal status on Windows and Linux. I'm not sure of any alternatives, apart from sticking Celery to the version 3 series.

If anyone else has seen this or has any ideas please let me know!


--
You received this message because you are subscribed to the Google Groups "OpenREM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrem+unsubscribe@googlegroups.com.
To post to this group, send an email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/openrem.
For more options, visit https://groups.google.com/d/optout.

David Platten

unread,
Jan 9, 2017, 2:45:11 PM1/9/17
to OpenREM, commis...@gmail.com
According to the link below Celery version 3.1.25 is the last version to officially support Windows:


David
To unsubscribe from this group and stop receiving emails from it, send an email to openrem+u...@googlegroups.com.

Ed McDonagh

unread,
Jan 9, 2017, 2:48:49 PM1/9/17
to OpenREM, commis...@gmail.com
Thanks David. You did a fairly recent Windows install - what version did it pull in?

@commissiongb did you try downgrading to an earlier version?

Ed

commis...@gmail.com

unread,
Jan 9, 2017, 3:07:18 PM1/9/17
to OpenREM, commis...@gmail.com
Hey Ed/David,

Thanks for the reply. I got pulled away from the fun stuff with Open REM to do a work issue. So that has my attention at the moment. I haven't tried to download the previous version. But I am going to try in a couple days. I'll keep you posted.

David Platten

unread,
Jan 10, 2017, 3:28:17 AM1/10/17
to OpenREM, commis...@gmail.com
My new install is running on Windows Server 2012 R2. Celery 4.0.0 is installed, and appears to work OK (exports work, for example). I'm running it with the "solo" switch. Here's the contents of the batch file that is used to start it:

d:
cd D:\Server_Apps\python27\Lib\site-packages\openrem
celery worker -n default -A openremproject -c 4 -Q default -P solo --pidfile=e:\media_root\celery\default.pid --logfile=e:\media_root\celery\default.log

David

Ed McDonagh

unread,
Jan 11, 2017, 3:37:00 PM1/11/17
to David Platten, OpenREM, Brian C.
Brian - can you try using the solo switch with Celery 4? Are you using Windows 7?

To unsubscribe from this group and stop receiving emails from it, send an email to openrem+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

David Platten

unread,
Jan 12, 2017, 5:50:19 AM1/12/17
to OpenREM, commis...@gmail.com
I'm using the solo switch because celery fails to run with anything else set, giving a long error message with this at the end:

AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'

I think this is a different error to the one that the original poster is receiving.

commis...@gmail.com

unread,
Jan 12, 2017, 10:59:12 AM1/12/17
to OpenREM, commis...@gmail.com
Finally got around to checking on this, tried to do a fresh install and now I am getting:

File "C:\Python27\lib\site-packages\django\conf\__init__.py"
tattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py"
up
self._wrapped = Settings(settings_module)
File "C:\Python27\lib\site-packages\django\conf\__init__.py"
it__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python27\lib\importlib\__init__.py", line 37, in im
__import__(name)
File "C:\Python27\Lib\site-packages\openrem\openremproject\_
5, in <module>
from .celery import app as celery_app
File "C:\Python27\Lib\site-packages\openrem\openremproject\c
, in <module>
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\celery\app\base.py", lin
over_tasks
if self.conf.CELERY_FORCE_BILLIARD_LOGGING:
File "C:\Python27\lib\site-packages\celery\datastructures.py
getattr__
return self[k]
File "C:\Python27\lib\site-packages\celery\datastructures.py
getitem__
return d[key]
File "C:\Python27\lib\site-packages\django\utils\functional.
inner
return func(self._wrapped, *args)
TypeError: 'Settings' object has no attribute '__getitem__'

C:\Python27\Lib\site-packages\openrem>python manage.py showmig
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\_
354, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\_
303, in execute
settings.INSTALLED_APPS
File "C:\Python27\lib\site-packages\django\conf\__init__.py"
tattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py"
up
self._wrapped = Settings(settings_module)
File "C:\Python27\lib\site-packages\django\conf\__init__.py"
it__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python27\lib\importlib\__init__.py", line 37, in im
__import__(name)
File "C:\Python27\Lib\site-packages\openrem\openremproject\_
5, in <module>
from .celery import app as celery_app
File "C:\Python27\Lib\site-packages\openrem\openremproject\c
, in <module>
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\celery\app\base.py", lin
over_tasks
if self.conf.CELERY_FORCE_BILLIARD_LOGGING:
File "C:\Python27\lib\site-packages\celery\datastructures.py
getattr__
return self[k]
File "C:\Python27\lib\site-packages\celery\datastructures.py
getitem__
return d[key]
File "C:\Python27\lib\site-packages\django\utils\functional.
inner
return func(self._wrapped, *args)
TypeError: 'Settings' object has no attribute '__getitem__'

Ed McDonagh

unread,
Jan 12, 2017, 11:13:32 AM1/12/17
to OpenREM, commis...@gmail.com
What is the command that resulted in the first error trace?

And it seems that the lines are truncated, eg 'C:\Python27\Lib\site-packages\openrem>python manage.py showmig'

commis...@gmail.com

unread,
Jan 12, 2017, 11:22:48 AM1/12/17
to OpenREM, commis...@gmail.com
I was trying python manage.py makemigrations remapp

commis...@gmail.com

unread,
Jan 12, 2017, 11:27:41 AM1/12/17
to OpenREM, commis...@gmail.com
Just realized it got truncated.

C:\Python27\Lib\site-packages\openrem>python manage.py makemigrations remapp
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 354, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 303, in execute
settings.INSTALLED_APPS
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 48, in __getattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Python27\Lib\site-packages\openrem\openremproject\__init__.py", line 5, in <module>
from .celery import app as celery_app
File "C:\Python27\Lib\site-packages\openrem\openremproject\celery.py", line 17, in <module>
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\celery\app\base.py", line 277, in autodiscover_tasks
if self.conf.CELERY_FORCE_BILLIARD_LOGGING:
File "C:\Python27\lib\site-packages\celery\datastructures.py", line 336, in __getattr__
return self[k]
File "C:\Python27\lib\site-packages\celery\datastructures.py", line 458, in __getitem__
return d[key]
File "C:\Python27\lib\site-packages\django\utils\functional.py", line 226, in inner

Ed McDonagh

unread,
Jan 16, 2017, 10:35:11 AM1/16/17
to OpenREM, commis...@gmail.com
Can you confirm which version of django and celery you are using please? (pip list would be a good way of checking).

All the stuff I've found on this error relate to an old version of both...

commis...@gmail.com

unread,
Jan 16, 2017, 10:59:37 AM1/16/17
to OpenREM, commis...@gmail.com
Hey Ed,

I am using whatever is in the package that gets downloaded from the pip install. I didn't change or sway from the posted instructions. Last time I did this, it was a fairly smooth install. Unfortunately, my time with this is waning.

essi...@gmail.com

unread,
Aug 27, 2017, 3:24:34 PM8/27/17
to OpenREM
I have the error on starting celery

AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'
Did anyone solve it?

David Platten

unread,
Aug 27, 2017, 3:35:17 PM8/27/17
to OpenREM
Hi there,

Yes, I've fixed this by forcing celery to just run with a single process. Try this command - it's what I use on my Windows install:

celery worker -n default -P solo -Ofair -A openremproject -c 1 -Q default --pidfile=C:\Media_Root\default.pid --logfile=C:\Media_Root\default.log

Regards,

David
Reply all
Reply to author
Forward
0 new messages