can't create app in putty

15 views
Skip to first unread message

Виктор Копылец

unread,
Dec 13, 2017, 7:33:07 AM12/13/17
to Django users
I buy hosting and create project. Then i decided create app. I write python manage.py startapp webapp and jumps out error : 


  Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/home2/victorko/virtualenv/app/3.4/lib/python3.4/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home2/victorko/virtualenv/app/3.4/lib64/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2212, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
  ImportError: No module named 'app.app'


Etienne Robillard

unread,
Dec 13, 2017, 8:28:51 AM12/13/17
to Виктор Копылец, django...@googlegroups.com

Hi,

Perhaps you need to set PYTHONPATH to the location where your app module is located.

HTH

Etienne

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Etienne Robillard
tka...@yandex.com
https://www.isotopesoftware.ca/

Jani Tiainen

unread,
Dec 13, 2017, 8:32:23 AM12/13/17
to django...@googlegroups.com

Hi,

Looks like you have added "app.app" in your installed apps _before_ creating actual app with that name. When trying to form environment for executing management command Django fails to find your app.

So either remove that app.app (which seems that it's not even name of the app you want to have), create your "webapp" app and after creating it add it to settings.py

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3cf5b8f8-dcdc-4827-9af6-0878fb33ce22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen
Reply all
Reply to author
Forward
0 new messages