Attempted to instance a server. The Z_SERVER works as expected. The server_upload fails.
First, it starts successfully. When user attempts to visit the appropriate web page (http://localhost:5010/upload), the server_upload fails with a Python error.
�[32mINFO�[0m: Started server process [�[36m42618�[0m]
�[32mINFO�[0m: Waiting for application startup.
�[32mINFO�[0m: Application startup complete.
�[32mINFO�[0m: Uvicorn running on �[1mhttp://0.0.0.0:5010�[0m (Press CTRL+C to quit)
�[31mERROR�[0m: Exception in ASGI application
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi
result = await app(self.scope, self.receive, self.send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/fastapi/applications.py", line 271, in __call__
await super().__call__(scope, receive, send)
File "/usr/lib/python3/dist-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/lib/python3/dist-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/lib/python3/dist-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/lib/python3/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/lib/python3/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/lib/python3/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/usr/lib/python3/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/usr/lib/python3/dist-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/lib/python3/dist-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/lib/python3/dist-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/git/Ridepad/uwu-logs/server_upload.py", line 68, in upload_get
return TEMPLATES.TemplateResponse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Jinja2Templates.TemplateResponse() got an unexpected keyword argument 'request'
pip install -r requirements.txt
apt-get install python3=3.11.2-1+b1 \
python3-fastapi=0.92.0-1 \
python3-pandas=1.5.3+dfsg-2 \
python3-zstd=1.5.2.5-1+b3 \
python3-jinja2=3.1.2-1+deb12u2 \
python3-flask=2.2.2-3
I suspect this to be a library version incompatibility. I have no experience with Python. How do I set up my environment to side step this error?
Attempted to instance a server. The
Z_SERVERworks as expected. Theserver_uploadfails.First, it starts successfully. When user attempts to visit the appropriate web page (http://localhost:5010/upload), the
server_uploadfails with a Python error.The same error appears when running with
python3or withgunicorn-20.1.0.Error log
Environment
.Debian 12
I suspect this to be a library version incompatibility. I have no experience with Python. How do I set up my environment to side step this error?