biocypher / biochatter-server

Flask server for BioChatter integration into web apps
MIT License
0 stars 6 forks source link

Fix: TypeError: __call__() missing 1 required positional argument: 'send' #18

Closed R3myG closed 4 months ago

R3myG commented 4 months ago

Changes

The Dockerfile's Gunicorn command for starting the server has been updated. It now uses UvicornWorker instead of simply running the app to avoid the missing 1 required positional argument send error.

Context

I was getting the following error when starting the container following the instructions from the readme

"/usr/local/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 178, in handle_request 2024-05-31 07:59:38 respiter = self.wsgi(environ, resp.start_response) 2024-05-31 07:59:38 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-05-31 07:59:38 TypeError: FastAPI.__call__() missing 1 required positional argument: 'send'

Following the suggestions from https://github.com/benoitc/gunicorn/issues/2154 I added -k uvicorn.workers.UvicornWorker to the Dockerfile

slobentanzer commented 4 months ago

Nice, thank you @R3myG :)