KeyError from create_application
See original GitHub issueSince upgrading to Channels 2, I get a number of these errors. I suspect this happens when restarting the deployed instance:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/daphne/http_protocol.py", line 160, in process
"server": self.server_addr,
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python3.6/site-packages/daphne/server.py", line 191, in create_application
), loop=asyncio.get_event_loop())
KeyError: <WebRequest at 0x7ff738677710 method=GET uri=/api/internal/projects/21/managed_objects/ clientproto=HTTP/1.1>
Unfortunately, it doesn’t help that there is a lot happening on this line, and I am not sure what part causes this error.
Issue Analytics
- State:
- Created 5 years ago
- Comments:26 (21 by maintainers)
Top Results From Across the Web
I am getting a `KeyError` when I receive a request to my API
1 Answer 1 · return json. · The client ignores the JSON response and calls location. · Links with href="#" are poor practice....
Read more >Common Errors - Amazon SageMaker - AWS Documentation
This section lists the errors common to the API actions of all AWS services. For errors specific to an API action for this...
Read more >AWS Lambda with API Gateway throwing response error #219
I'd like to be able to say exports.handler = app and for it to magically work whether the object passed in is a...
Read more >Error and Warning Dictionary | Twilio
ERROR Programmable Voice. Invalid BYOC trunk SID. 21301. Learn more. ERROR Programmable Voice. Cannot create application: application limit exceeded.
Read more >Openshift Flask: KeyError: 'socketio' : r/learnpython - Reddit
I am attempting to write a webchat to be run on Openshift, based on the code here . I invoke the program with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reference to commit that (hopefully) fixed this: ece52b8e7958b41c86fd89830bc7814368e42bde
Twisted closes “content” when the connection is lost, i.e. request is “finished” internally in Twisted. I fixed it by checking
if self.content.closed:
before initiating the request handling where content is read.Similar error only happened for me when using nginx as reverse proxy and I was able to reproduce it consistently when I found a working way to trigger it.