-
Notifications
You must be signed in to change notification settings - Fork 143
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
NoneType object has no attribute put http meta #152
Comments
Hey, Can you give a code snippet of what's triggering this? Is this ran on Lambda? I need a little bit more information so that I can try reproducing this and isolating the cause. By any chance, is this ran using the Serverless model? Thanks in advance. |
I'm doing this in urls.py, to patch all libraries
This is my config
This is run locally. I can reproduce this with even a simple view that only raises an exception
I have lots of custom middlewares, but XRay's is first. |
Everything looks good with your configuration. What version of Django are you using? We currently support only the following versions: |
I've got:
Django==1.11.15
…On Wed, 3 Apr 2019 at 14:35, Chan Chiem Jeffery Saeteurn < ***@***.***> wrote:
Everything looks good with your configuration. What version of Django are
you using?
We currently support only the following versions:
django >= 1.10, <2.0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#152 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHVzsX0228chOWRpsD9qSkR6I6-Cj8Gks5vdOZugaJpZM4cYsR7>
.
|
Is it possible for you to temporarily disable the other middlewares and see if this issue still persists? I'm thinking that maybe there's a middleware that's causing this issue. If the issue does goes away, can you also isolate which middleware is causing this exception? I still can't seem to reproduce this issue you're having on my local system, which is leading me to think that maybeone of the middlewares is causing issues with X-Ray. I also notice that you're using an ECS plugin. Is this plugin being used with X-Ray when you develop in your local development as well? Just as a sanity check, does removing the plugin from the configuration help? |
I'm getting this on Runsever as well, Django 2.2.3 |
I rolled Django Rest Framework back to 3.9.4 And this went away. 3.10 was not working |
I just had the same issue with flask 1.1.1 and aws-xray-sdk 2.4.2 running on AWS Lambda (Python 3.7) and deployed with Zappa. Everything (pynamodb, botocore, requests) is patched with patch_all(). I have not been able to reproduce.
|
quart==0.18.4, flask==2.2.5, aws-xray-sdk==2.14.0
Even if unable to reproduce, perhaps we could just fail gracefully if no segment? i.e. best effort to set annotations but not error? |
This appears to happen after "Subsegment api discarded due to Lambda worker still initializing" they could be related ? |
It looks like for whatever reason the flask/django integrations fail to start a segement which causes the problem, especially when lambda is still setting up. I had to add this code |
Using sdk version 2.4.2
The text was updated successfully, but these errors were encountered: