Forums

500 server error while trying to login to account

500 Server error There's been an error. It's been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.

I got the above error while I was trying to login to superuser account and account created. I could create account which was successful but to login is the issue.

Pls, kindly help.

If that's logging in to your web app, then check the error and server logs for your web app to find tracebacks that you can use to debug the problem.

2020-09-18 10:02:18 Internal Server Error: /accounts/login/#012Traceback (most recent call last):#012 File "/home/ojophilip/.virtualenvs/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner#012 response = get_response(request)#012 File "/home/ojophilip/.virtualenvs/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response#012 response = self.process_exception_by_middleware(e, request)#012 File "/home/ojophilip/.virtualenvs/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response#012 response = wrapped_callback(request, callback_args, callback_kwargs)#012 File "/home/ojophilip/.virtualenvs/env/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view#012 return self.dispatch(request, args, **kwargs)#012 File "/home/ojophilip/.virtualenvs/env/lib/python3.8/site-packages/django/utils/decorators.py

That's the error in the server log. Though the error b4 this was about caches which I commented out. I don't know what else to do.

I will greatly appreciate it if you can help. Thanks

That doesn't look like the full traceback. Look further down in the traceback to see what might be happening.

Thanks for prompt response, I think the issue comes from the caches. I changed db caches to local memory caches. Users can now log in but admin can't (I still can't figure out the reason). I will try to create another superuser and try again.

I really appreciate your effort.

I think it's unlikely that creating a new admin user will have any effect. If you have code that causes and exception when it's run with an admin user, then it will do the same with a new user. The traceback is what you should be looking at to work out where the problem lies. You could also inspect your code for sections that are only run for admin users.

I've actually checked the traceback but didn't see anything that could help as it's just pointing env. I get right back to you when I do what I said I would do. Thanks

I was able to login when I created another superuser. Thanks for the help u rendered

Ok. Glad to hear that.

I have an issue when logging in as a superuser. When debug is set to true I can log in via superuser but when I set debug to false the admin route gives me a 500 server error.

@BabaVoss What do you see in your error log?

Internal Server Error: /admin/

ValueError at /admin/ Missing staticfiles manifest entry for 'admin/css/base.css'

I have run the collectstatic command and it has worked. My problem has been solved. Thanks

Glad to hear that!