wooey / Wooey

A Django app that creates automatic web UIs for Python scripts.
http://wooey.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.13k stars 184 forks source link

wooey no longer running on windows because of dependency with celery 4.0 API #246

Closed tomanizer closed 6 years ago

tomanizer commented 6 years ago

wooey requires celery to run.

Celery 4 is no longer supported on windows and using it causes ValueError: not enough values to unpack (expected 3, got 0)

Downgrading to Celery 3.1.25 (last version to run on windows) does not help, because Wooey uses the celery 4.0 API which uses a new 'namespace' attribute.

  File "wooey_celery_app.py", line 13, in <module>
   app.config_from_object('django.conf:settings', namespace='CELERY')
  TypeError: config_from_object() got an unexpected keyword argument 'namespace'.

Suggestion: In celery_app.py check which version of celery is running and then use either the 3.1 or the 4.0 API.

Chris7 commented 6 years ago

Celery is not official supported anymore on Windows, but seems to work just fine by my testing in a VM.

Can you provide the output of pip freeze and your settings?

atyler333 commented 6 years ago

I was able to run it locally in python 3.6 on windows 10 using a modified celery command.

celery -A your_project_name worker --pooleventlet -l info

tomanizer commented 6 years ago

I managed to get it to work now as well on python 3.63 and Windows 7. I had to pip install eventlets which were not in the requirements.txt and use a celery call different from the one in the docs. Will post it here tomorrow. We should probably update the docs and update the requirements.txt.

Chris7 commented 6 years ago

That sounds great, I love PRs.

Chris7 commented 6 years ago

Looking back, I actually did have to use eventlet for celery on windows as well. You can see this here: https://github.com/wooey/Wooey/blob/master/setup.py#L22

This is also present in the docs (though the formatting seems to be broken :() https://wooey.readthedocs.io/en/latest/running_wooey.html?highlight=eventlet

I'm curious why eventlet was not installed for you. What version of setuptools/pip are you using?

tomanizer commented 6 years ago

I was using pip 10.

I also have to run celery with this command.

celery -A myapp worker -c 1 -l info -P eventlet

Chris7 commented 6 years ago

Closing this as the docs are up to date on this. If anyone wants to put forth a PR making the documentation more explicit and obvious in their opinion, it would be appreciated.

tomanizer commented 6 years ago

@Chris7 , the current docs are different from what i posted above.

the docs say you need to run

celery -A your_project_name worker --pool=eventlet -l info

whereas I had to run

celery -A myapp worker -c 1 -l info -P eventlet

is perhaps the '=' sign the culprit?

Chris7 commented 6 years ago

It could be the concurrency argument, can you try ommitting -c 1?