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

189
Views
Apache2&Django - NameError: el nombre "AttributeError" no está definido

Seguí casi toda la documentación oficial para ejecutar mi proyecto Django en mi servidor Ubuntu 18.04 v. Y parece funcionar... sudo service apache2 status -> todo bien también.

 [Sun May 03 16:07:20.489608 2020] [mpm_event:notice] [pid 11531:tid 139884218760128] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_wsgi/4.7.1 Python/3.8 configured -- resuming normal operations [Sun May 03 16:07:20.489764 2020] [core:notice] [pid 11531:tid 139884218760128] AH00094: Command line: '/usr/sbin/apache2'

Primero noté que algo no funcionaba cuando mis plantillas no se actualizaban sin reiniciar el servidor, lo cual no es el comportamiento habitual de Django (incluso en un entorno productivo). Cada vez que reinicio el servidor, aparece este error en apache2/error.log. Aunque el servidor sigue funcionando, quiero llegar al fondo de esto.

 Exception ignored in: <function Local.__del__ at 0x7fbd983f03a0> Traceback (most recent call last): File "/var/www/my_app/.my_app/lib/python3.8/site-packages/asgiref/local.py", line 95, in __del__ NameError: name 'AttributeError' is not defined Exception ignored in: <function Local.__del__ at 0x7fbd983f03a0> Traceback (most recent call last): File "/var/www/my_app/.my_app/lib/python3.8/site-packages/asgiref/local.py", line 95, in __del__ NameError: name 'AttributeError' is not defined [Sun May 03 16:07:19.418926 2020] [core:warn] [pid 11433:tid 140452536064960] AH00045: child process 11435 still did not exit, sending a SIGTERM [Sun May 03 16:07:20.419208 2020] [mpm_event:notice] [pid 11433:tid 140452536064960] AH00491: caught SIGTERM, shutting down [Sun May 03 16:07:20.489608 2020] [mpm_event:notice] [pid 11531:tid 139884218760128] AH00489: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_wsgi/4.7.1 Python/3.8 configured -- resuming normal operations [Sun May 03 16:07:20.489764 2020] [core:notice] [pid 11531:tid 139884218760128] AH00094: Command line: '/usr/sbin/apache2'
  • Ubuntu 18.04
  • Python3.8.0 y vinculado al comando python a través de alternativas de actualización
  • Python ejecutándose en venv

Estructura del proyecto:

 in /var/www/: |-- my_app | |-- my_app | | |-- __init__.py | | |-- asgi.py | | |-- settings.py | | |-- urls.py | | `-- wsgi.py | |-- db.sqlite3 | |-- manage.py | |-- media | |-- .my_app (python venv) | |-- my_subapp | | |-- __init__.py | | |-- admin.py | | |-- apps.py | | |-- migrations | | |-- models.py | | |-- tests.py | | |-- urls.py | | `-- views.py | `-- templates | |-- base.html | `-- index.html

¿Alguna sugerencia de qué podría estar mal y por qué dice "AttributeError not found?" cuando parece ser una clase estándar de python que se envía con ella lista para usar... Gracias por su ayuda :-)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Me tomó un día descubrir cuál era el problema. Gracias a Graham Dumpleton, el creador de mod_wsgi por explicarlo todo. Puedes buscarlo aquí:

https://github.com/GrahamDumpleton/mod_wsgi/issues/568

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!