```
[2020-09-05 15:34:28 -0700] [93779] [INFO] Booting worker with pid: 93779
[2020-09-05 15:34:28 -0700] [93780] [INFO] Booting worker with pid: 93780
[2020-09-05 15:34:28 -0700] [93781] [INFO] Booting worker with pid: 93781
[2020-09-05 15:34:28 -0700] [93782] [INFO] Booting worker with pid: 93782
[2020-09-05 22:34:30 +0000] [93780] [INFO] Started server process [93780]
[2020-09-05 22:34:30 +0000] [93781] [INFO] Started server process [93781]
[2020-09-05 22:34:30 +0000] [93782] [INFO] Started server process [93782]
[2020-09-05 22:34:30 +0000] [93779] [INFO] Started server process [93779]
Internal Server Error: /users/self/
Traceback (most recent call last):
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/utils/deprecation.py", line 116, in __call__
response = self.process_response(request, response)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/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'
2020-09-05 22:35:03,901 ERROR Internal Server Error: /users/self/
Traceback (most recent call last):
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/utils/deprecation.py", line 116, in __call__
response = self.process_response(request, response)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/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'
Internal Server Error: /users/self/
Traceback (most recent call last):
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/whitenoise/middleware.py", line 59, in __call__
response = self.get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 139, in __call__
return call_result.result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 428, in result
return self.__get_result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 384, in __get_result
raise self._exception
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 204, in main_wrap
result = await self.awaitable(*args, **kwargs)
TypeError: object HttpResponse can't be used in 'await' expression
2020-09-05 22:35:03,982 ERROR Internal Server Error: /users/self/
Traceback (most recent call last):
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/whitenoise/middleware.py", line 59, in __call__
response = self.get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 139, in __call__
return call_result.result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 428, in result
return self.__get_result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 384, in __get_result
raise self._exception
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 204, in main_wrap
result = await self.awaitable(*args, **kwargs)
TypeError: object HttpResponse can't be used in 'await' expression
```
--
Ticket URL: <https://code.djangoproject.com/ticket/31984>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
New description:
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31984#comment:1>
Old description:
> It seems like running Django with an asgi server like uvicorn in 3.1
New description:
packages/asgiref/sync.py", line 139, in __call__
return call_result.result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 428, in result
return self.__get_result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 384, in __get_result
raise self._exception
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 204, in main_wrap
result = await self.awaitable(*args, **kwargs)
TypeError: object HttpResponse can't be used in 'await' expression
2020-09-05 22:35:03,982 ERROR Internal Server Error: /users/self/
Traceback (most recent call last):
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 139, in __call__
return call_result.result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 428, in result
return self.__get_result()
File
"/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py",
line 384, in __get_result
raise self._exception
File "/Users/james/Github/oregano-server/.venv/lib/python3.7/site-
packages/asgiref/sync.py", line 204, in main_wrap
result = await self.awaitable(*args, **kwargs)
TypeError: object HttpResponse can't be used in 'await' expression
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31984#comment:2>
* status: new => closed
* resolution: => needsinfo
* component: Uncategorized => HTTP handling
Comment:
I'm not able to reproduce this issue with a sample project and builtin
middlewares. It looks that you're using a middleware which doesn't detect
properly an async response. Can you provide a same project that reproduces
this issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/31984#comment:3>