Questions tagged [asgi]
ASGI stand for Asynchronous Server Gateway Interface (ASGI), a "spiritual successor to WSGI, intended to provide a standard interface between async-capable Python web servers, frameworks, and applications."
asgi
248
questions
0
votes
1
answer
26
views
Get path template from starlette request from a middleware
I am building a middleware to log calls to functions among other things.
I have read about
FastAPI: How to get raw URL path from request?, which suggests to use request.scope.get("route"), ...
-1
votes
0
answers
29
views
receive and send arguments missing
TypeError at /ws/status/
app() missing 2 required positional arguments: 'receive' and 'send'
I got to only receive and send two (2) positional argument errors for the websocket in the Django Rest ...
1
vote
0
answers
32
views
Django code freezes using Daphne on async database queries
I am running an async django application that is downloading some data.
As I want the downloads to run asynchronously, I defined some async methods to run as coroutines.
These methods sometimes have ...
0
votes
0
answers
12
views
Django proyect tring to integrate asgi
I have a django proyect that works with views and django-rest-framework and now i want to add channels to it.
I have a django proyect that works with views and django-rest-framework and now i want to ...
1
vote
1
answer
70
views
What is the purpose of using daphne with django channels?
What is the primary purpose of using Daphne with Django channels, if we can already do the ASGI configuration ourselves? What is the relationship between ASGI & Daphne server?
0
votes
0
answers
164
views
Encountering "Error: Exception in ASGI application" for WebSocket server with FastAPI
Hi I am trying to create a simple WebSocket server and client with python and FastAPI.
When I run the server.py and it receives a message from client.py, the server will throw up the follow stack ...
0
votes
0
answers
40
views
using runserver in django runs all scripts but using daphne for production runs only asgi.py
I have a problem when i setup django for production
for some reason, when i use runserver it checks all the scripts and runs them all completely fine
but when i run it using daphne it ignores ...
0
votes
0
answers
41
views
WebSocket Unit Test Not Working in Django with TransactionTestCase
I'm building a simple app where users can join tables to play chess, connecting via WebSocket. Everything works as intended in the development environment: users can log in, join rooms, sit at tables, ...
0
votes
1
answer
189
views
Deploying Flet app from a docker container using Uvicorn
I am trying to run my flet as a web app from a docker container, but I am getting the following error message:
RuntimeError: asyncio.run() cannot be called from a running event loop
2024-05-27T18:46:...
0
votes
1
answer
81
views
RecursionError: maximum recursion depth exceeded | [Previous line repeated 972 more times] | socket.io
I need help that why i am getting error like RecursionError, i am using the python-socket
BTW before moving ahead i want to make it clear that this issue is not because of socket configuration it is ...
0
votes
0
answers
25
views
django-ninja: no Response object generated for ASGI api route
I'm running Django under ASGI and have basic api routes working fine. But when I follow the django-ninja documentation for an api route using a Schema response, I get this error:
'QuerySet' object has ...
3
votes
2
answers
106
views
Why doesn’t the ASGI specification allow handshake rejection with custom reason?
A client initially opens a connection to an ASGI compliant server. The server forwards a Connect event [asgi-spec] to the application. This event must be responded to with either an Accept event [asgi-...
0
votes
0
answers
24
views
Django channels web socket not working with nginx and gunicorn in the cloud server
This is my project configuration for Django channels, gunicorn and nginx.
In local machine the django websocket works great. but after deploying to the cloud server it shows this console error:
Mar 27 ...
0
votes
0
answers
78
views
Django WSGI and ASGI via Passenger confusion
Hi all I have a dedicated plesk server on the internet running debian 12. I've started experimenting with Django and deploying django apps via apache and Nginx. I have successfully managed to get a ...
0
votes
0
answers
33
views
Slow transfer speeds for the last chunk of data transferred from Python ASGI app
While attempting to analyse the network transfer speeds using a hypercorn ASGI app and requests API, there is a significant drop in speed for the last chunk.
Hypercorn ASGI app
from typing import Any
...