Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

339
Views
¿Cómo puedo corregir un error de wsgi en la aplicación beanstlak usando Python y fastapi?

Estoy usando Python y fasatpi (marco web). Mi archivo application.py es:

 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")

Esto funciona bien en la máquina local ejecutando python application.py

Sin embargo, cuando implemento un beanstalk elástico en AWS, después de varios intentos fallidos y también experimentando con un Procfile, de la siguiente manera:

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

Y el error repetido es:

[

 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'

¿Cómo puedo arreglar esto? Muchas gracias.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!