question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'ChannelPromise' object has no attribute '__value__'

See original GitHub issue

pip freeze:

-e git://github.com/django/django.git@df09d854828bcff56eb72f48ff1ba8fce7e90c90#egg=Django-origin/HEAD
Jinja2==2.7.3
MarkupSafe==0.23
-e git://github.com/python-imaging/Pillow@24cb7bf3df6660bb2bd705b3197e97947dd40a50#egg=Pillow-dev
PyYAML==3.11
Pygments==1.6
Unidecode==0.04.16
-e git://github.com/celery/py-amqp.git@6b945b7065bd3bc53142e2d3f1d520d6f4a3d2de#egg=amqp-origin/master
anyjson==0.3.3
argparse==1.2.1
-e git://github.com/celery/billiard.git@0c8b96c47551f4f0d2d58c53dda7251bcf03236c#egg=billiard-origin/HEAD
bpython==0.12
-e git://github.com/celery/celery.git@2391c30d13c03ba778cdb58208aeb70040fbc9cf#egg=celery-origin/HEAD
chardet==2.0.1
colorama==0.2.5
command-not-found==0.3
-e git://github.com/SimonSapin/cssselect.git@f7b38ba6446d06ba3ed815729e65229532cd1818#egg=cssselect-origin/HEAD
defer==1.0.6
-e git://github.com/django-admin-bootstrapped/django-admin-bootstrapped.git@cbb567b85d0800ec9ed4da07004bde91d2a22e5a#egg=django_admin_bootstrapped-origin/master
-e git://github.com/davidfischer-ch/django-allauth.git@42ccb12701609b2b213e0c1128be374413678ff1#egg=django_allauth-origin/master
django-appconf==0.6
-e git://github.com/brack3t/django-braces.git@c4491e223ba56e22489ac26f4bc17d674eae34f2#egg=django_braces-origin/HEAD
-e git://github.com/davidfischer-ch/django-celery.git@1509614cdccedabb86217ee92677d495dbac1270#egg=django_celery-origin/dev
-e git://github.com/django-compressor/django-compressor.git@67f5de2cf503e2c375e5fe36f050b8dfa8cba145#egg=django_compressor-origin/develop
-e git://github.com/davidfischer-ch/django-crispy-forms.git@568b60cc8073740221f133390b2dd921c442da6b#egg=django_crispy_forms-origin/HEAD
-e git://github.com/morninj/django-email-obfuscator.git@02cee5f7bc0c3798ec2f4e154eb0c9aebcf2ae4f#egg=django_email_obfuscator-origin/master
-e git://github.com/django-extensions/django-extensions.git@f7b1bb51aba9a5b749e6964833b429faf948e74d#egg=django_extensions-dev
-e git://github.com/alex/django-filter.git@d88b98dd2b70551deb9c128b209fcf783b325acc#egg=django_filter-develop
-e git://github.com/evonove/django-oauth-toolkit.git@324cd9cd22833a038306f462a00f912b062f4519#egg=django_oauth_toolkit-origin/HEAD
django-phonenumber-field==0.5
-e git://github.com/davidfischer-ch/django-sendfile.git@7f79b124c6153a200116906a72110069f0eac268#egg=django_sendfile-dev
-e git://github.com/mbi/django-simple-captcha.git@47260b8b4c416bc5c5781e1724103d0c9c1cb4f6#egg=django_simple_captcha-origin/master
-e git://github.com/davidfischer-ch/django-rest-framework.git@b2e07d8613c289e14b2054e1e76837c29807595e#egg=djangorestframework-namespace
html5lib==0.999
-e git://github.com/celery/kombu.git@244b882e0c103b915e98de6ebb7d0cb026974515#egg=kombu-origin/HEAD
language-selector==0.1
lxml==3.3.5
mock==1.0.1
oauthlib==0.6.1
passlib==1.6.2
phonenumbers==6.1.0
psycopg2==2.5.3
pyaml==14.05.7
pycallgraph==1.0.1
pycurl==7.19.3
pygal==1.4.6
pygobject==3.12.0
pymongo==2.7.1
python-apt==0.9.3.5
python3-openid==3.0.4
pytoolbox==8.3.3-beta
pytz==2014.4
requests==2.2.1
requests-oauthlib==0.4.1
selenium==2.41.0
sendgrid==0.5.1
-e git://github.com/elbuo8/sendgrid-django.git@b026123f6dac27de9f67b95c2c9ef172bda53c2a#egg=sendgrid_django-origin/master
six==1.5.2
slumber==0.7.1.dev
smtpapi==0.1.2
-e git://github.com/davidfischer-ch/splinter.git@3d4924e1ac48b3e8968050246b0e77711f3f635c#egg=splinter-origin/HEAD
uWSGI==2.0.5.1
ufw==0.34-rc-0ubuntu2
unattended-upgrades==0.1
unittest2py3k==0.5.1
urllib3==1.7.1
-e git://github.com/alecthomas/voluptuous.git@0873a4d1f542997fcb6849fdfc0f68d66d7b7f18#egg=voluptuous-dev

Traceback:

Traceback (most recent call last):
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/utils/__init__.py", line 405, in __call__
    return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/cloudncode/venv/src/django/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django-braces/braces/views/_access.py", line 66, in dispatch
    request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 205, in post
    return super(BaseCreateView, self).post(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 171, in post
    return self.form_valid(form)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 147, in form_valid
    self.object = form.save()
  File "/home/ubuntu/cloudncode/server/cloudncode_base/forms/encoding.py", line 42, in save
    instance.launch()
  File "/home/ubuntu/cloudncode/server/cloudncode_base/models/encoding.py", line 89, in launch
    tasks.EncodingTask().apply_async(kwargs={'task_pk': self.pk}, task_id=self.meta_id)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/task.py", line 462, in apply_async
    **dict(self._get_exec_options(), **options)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/base.py", line 383, in send_task
    amqp.send_task_message(P, name, message, **options)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/amqp.py", line 468, in publish_task
    **properties
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 168, in publish
    routing_key, mandatory, immediate, exchange, declare)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 436, in _ensured
    return fun(*args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 173, in _publish
    channel = self.channel
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 190, in _get_channel
    channel = self._channel = channel()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/utils/__init__.py", line 407, in __call__
    value = self.__value__ = self.__contract__()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 205, in <lambda>
    channel = ChannelPromise(lambda: connection.default_channel)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 756, in default_channel
    self.connection
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 741, in connection
    self._connection = self._establish_connection()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 696, in _establish_connection
    conn = self.transport.establish_connection()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/transport/pyamqp.py", line 112, in establish_connection
    conn = self.Connection(**opts)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 217, in __init__
    self.connect()
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 236, in connect
    self.drain_events()
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 354, in drain_events
    return self.blocking_read(timeout)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 359, in blocking_read
    return self.on_inbound_frame(read_frame())
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/method_framing.py", line 65, in frame_handler
    callback(channel, method_sig, buf, None)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 385, in on_inbound_method
    method_sig, payload, content,
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/abstract_channel.py", line 124, in dispatch_method
    args, _ = loads(amqp_method.args, payload, 4)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/serialization.py", line 229, in loads
    val[key], offset = _read_item(buf, offset)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/serialization.py", line 154, in _read_item
    ftype, type(ftype)))
amqp.exceptions.FrameSyntaxError: Unknown value in table: 70 (<class 'int'>)
ERROR Internal Server Error: /fr/encoding/task/create
Traceback (most recent call last):
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/utils/__init__.py", line 405, in __call__
    return self.__value__
AttributeError: 'ChannelPromise' object has no attribute '__value__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/cloudncode/venv/src/django/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django-braces/braces/views/_access.py", line 66, in dispatch
    request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 205, in post
    return super(BaseCreateView, self).post(request, *args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 171, in post
    return self.form_valid(form)
  File "/home/ubuntu/cloudncode/venv/src/django/django/views/generic/edit.py", line 147, in form_valid
    self.object = form.save()
  File "/home/ubuntu/cloudncode/server/cloudncode_base/forms/encoding.py", line 42, in save
    instance.launch()
  File "/home/ubuntu/cloudncode/server/cloudncode_base/models/encoding.py", line 89, in launch
    tasks.EncodingTask().apply_async(kwargs={'task_pk': self.pk}, task_id=self.meta_id)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/task.py", line 462, in apply_async
    **dict(self._get_exec_options(), **options)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/base.py", line 383, in send_task
    amqp.send_task_message(P, name, message, **options)
  File "/home/ubuntu/cloudncode/venv/src/celery/celery/app/amqp.py", line 468, in publish_task
    **properties
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 168, in publish
    routing_key, mandatory, immediate, exchange, declare)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 436, in _ensured
    return fun(*args, **kwargs)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 173, in _publish
    channel = self.channel
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 190, in _get_channel
    channel = self._channel = channel()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/utils/__init__.py", line 407, in __call__
    value = self.__value__ = self.__contract__()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/messaging.py", line 205, in <lambda>
    channel = ChannelPromise(lambda: connection.default_channel)
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 756, in default_channel
    self.connection
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 741, in connection
    self._connection = self._establish_connection()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/connection.py", line 696, in _establish_connection
    conn = self.transport.establish_connection()
  File "/home/ubuntu/cloudncode/venv/src/kombu/kombu/transport/pyamqp.py", line 112, in establish_connection
    conn = self.Connection(**opts)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 217, in __init__
    self.connect()
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 236, in connect
    self.drain_events()
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 354, in drain_events
    return self.blocking_read(timeout)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 359, in blocking_read
    return self.on_inbound_frame(read_frame())
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/method_framing.py", line 65, in frame_handler
    callback(channel, method_sig, buf, None)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/connection.py", line 385, in on_inbound_method
    method_sig, payload, content,
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/abstract_channel.py", line 124, in dispatch_method
    args, _ = loads(amqp_method.args, payload, 4)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/serialization.py", line 229, in loads
    val[key], offset = _read_item(buf, offset)
  File "/home/ubuntu/cloudncode/venv/src/py-amqp/amqp/serialization.py", line 154, in _read_item
    ftype, type(ftype)))
amqp.exceptions.FrameSyntaxError: Unknown value in table: 70 (<class 'int'>)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:5
  • Comments:32 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
xavierpcommented, Apr 29, 2016

@fwachs Hello ! I’m getting the error too. It seems that it does not even try to connect and crashs before. Did you find any workaround ? Thanks.

3reactions
zhao-weiqicommented, Feb 24, 2022

i’m still getting this error.

celery==5.2.3
kombu==5.2.3

Anyone can help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django celery error while adding tasks to RabbitMQ message ...
AttributeError : 'ChannelPromise' object has no attribute 'value'. From django shell I am adding the task to my message queue.
Read more >
'ChannelPromise' object has no attribute '__value__' : r/django
Django celery error while adding tasks to RabbitMQ message queue : AttributeError: 'ChannelPromise' object has no attribute '__value__'.
Read more >
'ChannelPromise' object has no attribute '__value__' when ...
__value__ AttributeError: 'ChannelPromise' object has no attribute '__value__'. I am using the stable branch of taiga-back.
Read more >
Django Celery task is showing me "attribute error"?
Hi i build django web application that fetch data from microsoft graph api and inside my django view.py i am calling my task...
Read more >
[Solved]-celery error :'module' object has no attribute 'celery'
[Solved]-celery error :'module' object has no attribute 'celery'-django ... queue : AttributeError: 'ChannelPromise' object has no attribute '__value__' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found