-
-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'ChannelPromise' object has no attribute '__value__' #369
Comments
Thanks! Is this the py-amqp master branch? The bug is not in ChannelPromise, it will raise AttributeError there when the promise has not been evaluated, so the second exception is the real issue. |
Indeed, I am still not used to read Python 3 traceback with raise from :-) Here is the exact commit of py-ampq: I am also using a modified django-celery, but I do not think the issue is related to this. |
It seems you are using amqp master? This is not yet stable, you should be using 1.4.x |
Python 3 issue, we will be porting the development changes to py3 soon |
I'm still seeing this in 3.0.33 (with aqmp 1.4.9). With this issue closed, is this being tracked? |
This was supposedly fixed in 3.0.15, I also just received it though. (amqp 1.4.9, kombu 3.0.33)
I'm not sure why, but it seems like the |
Any news on this? I'm getting the same error. How should we procede? |
@fwachs: Can you make sure the code can actually connect to your Rabbit server, cuz it seems like I was actually getting this error somehow because of that? |
It's not connecting to the rabbit server actually. It doesn't matter what parameter I use, It will try to connect to localhost instead of the string I set. |
@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 ? |
I am also encountering this exception. I'd love to learn of a workaround. |
Do you have the exact same traceback? What version of Python? The AttributeError is clearly being catched so that error message has nothing to do with the real error. |
I actually tracked it down to not setting the AMQP host correctly when configuring app = Celery('app_name', broker='amqp://')
class config:
BROKER_URL = 'amqp://a_real_host:5672/'
app.config_from_object(config) The broker URL from To be clear--it was most certainly a problem in my own code, which I've since fixed. Hopefully this will help someone else. |
@fwachs I also ran into this. The problem was that celery was not being initialized in the django app. http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html The celery client was trying to connect to amqp://127.0.0.1:5672 which caused the stacktrace similar to the one originally reported. |
I run into this error when the broker is not yet online. I am running a worker, a master, and a rabbitmq broker in separate containers with In this case I would really like to inherit the default retry logic that my worker celery process seems to have:
I am running on |
@tmehlinger you saved my day thanks! I now import the app object directly from MY celery.py that actually reads up the project's settings.py |
can any of you send a fix or documentation improvement to avoid this error? |
+1 |
In my case, mq was not running. After I execute it, the error message doesn't occur any more. |
Start rabbitmq-server fix my scenario. |
In my case the problem was a container that was down |
It seems like it is back for 4.6.5 downgrading it 4.6.4 fixed it for me. Using celery==4.3.0 |
could you try https://github.com/celery/kombu/releases/tag/4.6.6 or master? |
hey guys, I know that this ticket is marked as I am using
Here is my rabbitmq.config:
Here is the stacktrace
|
Please refer to StackOverflow or our mailing list. |
Hey @gtangthousandeyes, I'm facing same issue. Did you happen to resolve it?
|
For me, reinstalled rabbitmq with newer version and it worked. |
i'm still getting this error.
Anyone can help? |
@zhao-weiqi |
Is there a solution to this? |
I have a Django app with an integration test that runs multiple tasks in eager mode. The test works perfectly in my local test environment when started with The celery configuration is the same. If anybody has any ideas where I could start looking for a solution I would appreciate it. |
In case any of you is having problem running this on a CI/CD pipeline with Python, I solved this by adding RabbitMQ as a service in my .yml file:
Hope this helps. |
it work well for me but work badly for me |
For those who tried all the above solution but still getting the same error (espeically if you are using Check your environment variable setting for So the stupid mistake I made was that I only set this environment variable for the django container and forgot setting the one for the celery container in my |
I made a stupid mistake in my __init__.py of changing
to
and it caused this error. I had to play around a lot to find this cause. |
pip freeze:
Traceback:
The text was updated successfully, but these errors were encountered: