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

1.9K
Views
Gunicorn: no se pudo encontrar el atributo 'aplicación' en 'wsgi' al intentar iniciar el servidor de matraz

Gunicorn no puede iniciar el servidor de matraz con el error: Failed to find attribute 'app' in 'wsgi'. .

El wsgi.py

 #!/usr/bin/python3 import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0,"/root/customer-account-automation/") from app import app as application if __name__ == "__main__": application.run()

app.py

 #!/usr/bin/python3 from flask import Flask app = Flask(__name__) ...

Estructura del proyecto:

 (customer-account-automation) root@jsd-user-management:~/customer-account-automation# tree . ├── Pipfile ├── Pipfile.lock ├── README.md ├── __pycache__ │  ├── app.cpython-37.pyc │  └── wsgi.cpython-37.pyc ├── app.py ├── customerAccountMgmt.py ├── get-pip.py ├── static │  ├── app.js │  ├── bulma.min.css │  ├── highlight.min.css │  ├── highlight.min.js │  └── styles.css ├── templates │  ├── 404.html │  ├── base.html │  ├── change_password.html │  ├── create_user.html │  ├── deactivate_user.html │  └── login.html └── wsgi.py

Verifiqué ( Gunicorn no puede encontrar la aplicación cuando el nombre cambió de "aplicación" ), pero no se relaciona con la mía porque ya uso la application .

¿Alguna idea de cuál podría ser el problema?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Gunicorn está buscando una aplicación en wsgi, así que cambia

 from app import app as application if __name__ == "__main__": application.run()

para

 from app import app as application app = application

Luego puedes ejecutar do... que es lo que supongo que estás haciendo

 gunicorn <all the options here> wsgi:app
over 4 years ago · Santiago Trujillo Report
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!