I made and successfully ran Django project in Windows, but after copying it to Linux and executing command “python manage.py runserver” following error occured:
Traceback (most recent call last):
File "manage.py", line 14, in <module>
os.environ.setdefault("DJANGO_SETTINGS_MODULE")
File "/home/blizzard/webapps/django_1_3/moz455/env0/lib/python2.6/UserDict.py", line 63, in setdefault
self[key] = failobj
File "/home/blizzard/webapps/django_1_3/moz455/env0/lib/python2.6/os.py", line 472, in __setitem__
putenv(key, item)
TypeError: putenv() argument 2 must be string, not None
Right values for key and item are “DJANGO_SETTINGS_MODULE” and “settings”.
How to avoid this error?
Answer is so simple that this question should not be asked 🙂 But maybe it save somebody several minutes.
For Linux correct command is