I have cloned the repository at https://github.com/viewflow/cookbook and am attempting to run the viewflow_helloworld tutorial.
When installing the requirements the default settings installs the latest version of Django (1.10.5), Celery 4.0.2 and Kombu 4.0.2. The application doesn't appear to be compatible with these and returns an error when running the migration
python manage.py migrate
Traceback (most recent call last):
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/apps/config.py", line 118, in create
cls = getattr(mod, cls_name)
AttributeError: 'module' object has no attribute 'django'
Changing the requirements.txt file to download the following
django==1.7
django-viewflow
celery==3.0.24
kombu==2.5.15
Works up until the point that I try to log into the local server
The stack trace is
python manage.py runserver
Traceback (most recent call last):
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/conf/__init__.py", line 94, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2212, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/config/__init__.py", line 3, in <module>
from .celery_app import app as celery_app # NOQA
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/config/celery_app.py", line 4, in <module>
from celery import Celery
ImportError: cannot import name 'Celery'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/core/management/__init__.py", line 345, in execute
settings.INSTALLED_APPS
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/conf/__init__.py", line 46, in __getattr__
self._setup(name)
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/Users/rodj/PycharmProjects/Django/cookbook/viewflow_helloworld/env/lib/python3.4/site-packages/django/conf/__init__.py", line 98, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'config.settings' (Is it on sys.path? Is there an import error in the settings file?): cannot import name 'Celery'
It appears that this can no longer connect to Celery with these settings.
Can anyone please advise if they have managed to get this working and if so what combination of libraries and versions are required?
As noted in readme django-viewflow have no support for django 1.7
Also you tried to run the demo with outdated kombu version.
Here is the latest versions of requirements that supported by viewflow 0.10
django==1.10.5 django-viewflow==0.10.0 django-filter==0.15.3 celery==3.1.23 kombu==3.0.37
You can use celery 4.x, but in this case you need to update the demo settings.py and use different broker, celery 4.x drops the django:// broker support.