Django #2 tutorial | runserver error after setting up the first .py scripts

by: karlthecoder, 8 years ago

Last edited: 8 years ago

The error I get when I run the python3 runserver manage.py command in  virtualenv.

(firstpythonproject) karlswormachine:my_project Karl$ python3 manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/site-packages/django/core/management/__init__.py", line 316, in execute
    settings.INSTALLED_APPS
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/Users/Karl/Desktop/firstpythonproject/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'my_project'
______________

Does someone have a solution for this error? please tell me then!



You must be logged in to post. Please login or register an account.