Forums

'Unhandled Exception' error - Django web application

I am trying to deploy an existing django web app on the server. I am trying to follow the steps given at https://www.pythonanywhere.com/wiki/DjangoTutorial#Existing_apps_.2F_manual_config But I am continuously running into the same 'Unhandled exception' error after step 1 (modifying the wsgi file). When I checked the error logs, it says 'ImportError: Could not import settings 'mysite.settings' (Is it on sys.path?): No module named mysite.settings'

'mysite' is the name of my project and I have provided the path correctly to access the project. I am not really sure now how should it work?

Hi there -- I'm seeing a 404 page when I visit your web app rather than an "Unhandled exception". Did you change something since you posted this?

I´´m getting the exact same problem. Can anyone help us out?

The best way to debug this kind of thing is to look at the logs, which are linked from the "Web" tab. The error log will almost certainly have something helpful.

pjestrada: The issue I was facing was with my Django env. I was using Django 1.4.5 version which is not yet supported directly by Pythonanywhere (default seems to be 1.3 for python 2.7). So I had to set up a virtual env. for 1.4.5. I had no problems after that. As giles correctly said, look for the error log which will help you finding the issue.