[Bitnami AWS LightSail Django] Apache NameError

Keywords: Django - AWS - Technical issue - Application configuration

bnsupport ID: 647b7884-436a-30f7-76b8-430f171671bb

bndiagnostic output:

? Apache: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
I deployed a Django project on AWS Lightsail. When I started the server with command: ‘python manage.py runserver 0.0.0.0:8000’, everything is good.

Then I tried to use Apache server. The website is on and everything looks good until I submitted a form and got ‘Server Error (500)’ on client browser.
Here is error logs on /opt/bitnami/apache/logs/error_log :

Exception ignored in: <function Local.__del__ at 0x7ff25828dc10>
Traceback (most recent call last):
  File "/opt/bitnami/python/lib/python3.8/site-packages/asgiref/local.py", line 96, in __de
l__
NameError: name 'TypeError' is not defined
Exception ignored in: <function Local.__del__ at 0x7ff25828dc10>
Traceback (most recent call last):
  File "/opt/bitnami/python/lib/python3.8/site-packages/asgiref/local.py", line 96, in __de
l__
NameError: name 'TypeError' is not defined
Exception ignored in: <function Local.__del__ at 0x7ff25828dc10>
Traceback (most recent call last):
  File "/opt/bitnami/python/lib/python3.8/site-packages/asgiref/local.py", line 96, in __de
l__
NameError: name 'TypeError' is not defined
Exception ignored in: <function Local.__del__ at 0x7ff25828dc10>
Traceback (most recent call last):
  File "/opt/bitnami/python/lib/python3.8/site-packages/asgiref/local.py", line 96, in __de
l__
NameError: name 'TypeError' is not defined

And the result when ran Bitnami Diagnose Tool:

===== Begin of bndiagnostic tool output =====

 
    ? Apache: Found possible issues
    ✓ Mariadb: No issues found
    ✓ Connectivity: No issues found
    ✓ Resources: No issues found
    ✓ Processes: No issues found
 

 
[Apache]

Found recent error or warning messages in the Apache error log.

NameError: name ‘TypeError’ is not defined
NameError: name ‘TypeError’ is not defined
NameError: name ‘TypeError’ is not defined

I have tried google but not finding anything can help.
Thanks.

When I set DEBUG=True, I got this error from client browser when submitting a form:

OperationalError at /
(1045, 'Plugin sha256_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/sha256_password.so: cannot open shared object file: No such file or directory')

Hi @DarkKnight7,

I found the following information regarding this issue on stackoverflow:

https://stackoverflow.com/questions/65025278/apache2-django-nameerror-name-typeerror-is-not-defined

Could you check the solution described there?

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.