0
votes

I'm working on a linux (fedora) machine and I want to use celery in python3.3. When i execute these command:

celery -A tasks worker --loglevel=info
celery worker --help

I get the following error:

    [root@localhost gert]# celery -A tasks worker --loglevel=info
Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/base.py", line 399, in find_app
    sym = self.symbol_by_name(app)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/base.py", line 418, in symbol_by_name
    return symbol_by_name(name, imp=import_from_cwd)
  File "/usr/lib/python3.3/site-packages/kombu-2.5.9-py3.3.egg/kombu/utils/__init__.py", line 80, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/utils/imports.py", line 87, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib64/python3.3/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1023, in load_module
  File "<frozen importlib._bootstrap>", line 1004, in load_module
  File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 869, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/home/gert/tasks.py", line 3, in <module>
    celery = Celery('tasks', broker='amqp://guest@localhost//')
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/app/base.py", line 131, in __init__
    if self._config_source:
AttributeError: 'Celery' object has no attribute '_config_source'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/celery", line 9, in <module>
    load_entry_point('celery==3.1.0rc1', 'console_scripts', 'celery')()
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/__main__.py", line 30, in main
    main()
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/celery.py", line 77, in main
    cmd.execute_from_commandline(argv)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/celery.py", line 709, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/base.py", line 260, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/base.py", line 388, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/bin/base.py", line 402, in find_app
    sym = import_from_cwd(app)
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/utils/imports.py", line 87, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib64/python3.3/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1023, in load_module
  File "<frozen importlib._bootstrap>", line 1004, in load_module
  File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 869, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/home/gert/tasks.py", line 3, in <module>
    celery = Celery('tasks', broker='amqp://guest@localhost//')
  File "/usr/lib/python3.3/site-packages/celery-3.1.0rc1-py3.3.egg/celery/app/base.py", line 131, in __init__
    if self._config_source:
AttributeError: 'Celery' object has no attribute '_config_source'

I already installed the required packages so my site-packages map in python3.3 looks like this:

  • celery-3.1.0rc1-py3.3.egg
  • amqp-1.2.0-py3.3
  • anyjson-0.3.3-py3.3.egg
  • billiard-3.3.0.0rc1-py3.3.egg
  • distribute-0.6.28-py3.3.egg-info
  • easy_install.py
  • kombu-2.5.9-py3.3.egg
  • pip-1.2.1-py3.3.egg-info
  • pkg_resources.py
  • pycache (with underscores)
  • python_dateutil-2.0-py3.3.egg
  • pytz-2013b-py3.3.egg
  • setuptools
  • setuptools-0.6c11-py3.3.egg-info
  • site.py
  • six-1.3.0-py3.3.egg

does anyone know what I'm missing, or what I've done wrong?

1
Please include the full traceback of the error. - Martijn Pieters♦
i edited my post, thanks for the feedback - GertV
You must be using the dev version of Celery, right? Since 3.1 hasn't yet been released. It is quite possible that you hit a bug that still needs correcting, did you file an issue with Celery issue tracker? - Martijn Pieters♦
i didn't yet, because the exact same installation DID work on my virtual machine. I was able to execute all of the celery commands. When I re-installed everything on my other fedora client(dual boot) it gave me this error. I did download celery from github, maybe some1 did a commit in the mean time? - GertV
I say it's quite likely that someone made commits in the meantime; looking at the commit history Ask is quite busy. - Martijn Pieters♦

1 Answers

1
votes

As martijn said, the answer is simple. Someone did a commit to the celery project in github, I pulled my previous version and now it works. This error shouldn't be much of a problem when they get it fixed.