Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oscarhermoso/bug-opentelemetry-django-asgi
https://github.com/oscarhermoso/bug-opentelemetry-django-asgi
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/oscarhermoso/bug-opentelemetry-django-asgi
- Owner: oscarhermoso
- Created: 2021-10-09T05:54:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T20:46:42.000Z (over 1 year ago)
- Last Synced: 2023-03-08T22:26:33.223Z (over 1 year ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bug-opentelemetry-django-asgi
Presented with this error message when attempting to run Python 3.8.11 // Django 3.2.8 // Channels 3.0.4 // OpenCensus middleware.
Created for this issue: https://github.com/census-instrumentation/opencensus-python/issues/1082
> # 500 Internal Server Error
>
> Exception inside application.
>
> _Daphne_Screenshot
![image](https://user-images.githubusercontent.com/23239955/136654348-619d3aee-94bb-4a8d-bce9-fb0c3db1c11c.png)
## With the Django channels app enabled
```
python manage.py runserver --settings testproject.with_channelsHTTP GET / 200 [0.01, 127.0.0.1:36604]
```
## With the OpenCensus middleware
```
python manage.py runserver --settings testproject.with_opencensus[09/Oct/2021 07:41:18] "GET / HTTP/1.1" 200 40
```
## With both enabled
```
python manage.py runserver --settings testproject.with_bothInternal Server Error: /
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/vscode/.local/lib/python3.8/site-packages/django/utils/deprecation.py", line 119, in __call__
response = self.process_response(request, response)
File "/home/vscode/.local/lib/python3.8/site-packages/django/middleware/clickjacking.py", line 26, in process_response
if response.get('X-Frame-Options') is not None:
AttributeError: 'coroutine' object has no attribute 'get'
Exception inside application: object HttpResponse can't be used in 'await' expression
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.8/site-packages/channels/staticfiles.py", line 44, in __call__
return await self.application(scope, receive, send)
File "/home/vscode/.local/lib/python3.8/site-packages/channels/routing.py", line 71, in __call__
return await application(scope, receive, send)
File "/home/vscode/.local/lib/python3.8/site-packages/django/core/handlers/asgi.py", line 161, in __call__
response = await self.get_response_async(request)
File "/home/vscode/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 150, in get_response_async
response = await self._middleware_chain(request)
TypeError: object HttpResponse can't be used in 'await' expression
HTTP GET / 500 [0.68, 127.0.0.1:36658]
```