Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

350
Vistas
how can I fix a wsgi error on beanstlak app using Python and fastapi

I am using Python and fasatpi (web framework). My application.py file is:

from fastapi import FastAPI
import uvicorn

application = FastAPI()


@application.get("/")
def read_root():
    return {"Hello": "World"}



if __name__ == "__main__":
    uvicorn.run("application:application", host="127.0.0.1", port=5000, log_level="info")

This runs fine on local machine by running python application.py

However when I deploy to an elastic beanstalk on AWS, after multiple failed attempts and also experimenting with a Procfile, as follows:

web: uvicorn application:app --host=0.0.0.0 --port=${PORT:-5000}

And repeated error is:

[

Tue Jun 16 08:58:16.659854 2020] [mpm_prefork:notice] [pid 8242] AH00163: Apache/2.4.43 (Amazon) mod_wsgi/3.5 Python/3.6.10 configured -- resuming normal operations
[Tue Jun 16 08:58:16.659870 2020] [core:notice] [pid 8242] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue Jun 16 08:58:19.704522 2020] [:error] [pid 8247] [remote 127.0.0.1:0] mod_wsgi (pid=8247): Exception occurred processing WSGI script '/opt/python/current/app/application.py'.
[Tue Jun 16 08:58:19.704608 2020] [:error] [pid 8247] [remote 127.0.0.1:0] TypeError: __call__() missing 1 required positional argument: 'send'

How can I fix this? Many thanks.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda