Forums

new aplication - ImportError: Could not import settings 'to2.settings' error

i create an new django priject. when i visit its url i get "Unhandled Exception"

in log:

ImportError: Could not import settings 'to2co.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named to2co.settings

what can be the problem ?

i try to create flask app on that domain and its work OK.

Check your sys.path and the name of the module carefully?

if you have a django app at:

/home/reuven/myfolder/myproject/settings.py

Then you need

sys.path.append('/home/reuven/myfolder')
DJANGO_SETTINGS_MODULE = 'myproject.settings'

I didn't change it. it was created automatically, as a new priject (Django, Python 2.7).

I try (Django, Python 3.3), and its work fine. at www.to2.co.

i think there is some bug to fix in pythonanywhere system.

hmmm. So it's working fine now?

if i choose to create the project with python 3.3 it is.

if i choose python 2.7 it is not.

I prefer 2.7 become more plugins support it.

If you switch back to 2.7, and show me the broken site, I can take a look (if you give me permission to look at your files).

i did that. please, take a look.

Right. Looks like you settings file is at

/home/reuben/tmp777/tmp777/settings.py

That looks to me like a django 1.6. setup. Did you manually upgrade django using pip install --user? that would break our quickstart wizard.

You can fix it by doing

sys.path.append('/home/reuben/tmp777')

in your wsgi file, instead of just /home/reuben.

You might also want to look at our instructions for using a virtualenv if you want to use different packages from our system-installed ones.