Python RunServer Django script not starting











up vote
-2
down vote

favorite
2












    Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 3, in <module>
from celery import Celery
ImportError: No module named celery


i just installed pip install celery now i am facing other issue



(triad_realty) root@webettonew:~/triad_realty# python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 10, in <module>
app = Celery('triad_realty',broker=settings.CELERY_BROKER_URL)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/settings.py", line 17, in <module>
ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
AttributeError: 'module' object has no attribute 'Path'


i am struggling to fix this issue please if anybody could help me right away.



i did install environ though the command pip install environ but maybe i need to change the environ.Path but to what if anybody could help me out i would be very thankful i am whole day stuck at it



i am sharing my settings.py file



"""
Django settings for triad_realty project.

Generated by 'django-admin startproject' using Django 1.9.8.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from __future__ import absolute_import, unicode_literals

import environ

ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
APPS_DIR = ROOT_DIR.path('triad_realty')

# Global Variable Type
env_path = str(ROOT_DIR.path('.env'))
env = environ.Env()
environ.Env.read_env(env_path)

WEBSITE=env("WEBSITE")

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'i%be$q6@6@79z(54hvmn#2@6kdygctob2$n!&l-^%9s#h_u(^o'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Apps
'users',
'investor',
'projectowner',
'detail',
'allauth', # registration
'allauth.account',
'django.contrib.humanize',# registration
'djcelery',
'djcelery_email',
]

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'triad_realty.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [str(APPS_DIR.path('templates')),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/'

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


WSGI_APPLICATION = 'triad_realty.wsgi.application'

FIXTURE_DIRS = (
str(APPS_DIR.path('fixtures')),
)

EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend')

# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
if env('DEPLOYMENT') == "testing":
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DBNAME'),
'USER': env('DBUSER'),
'PASSWORD': env('DBUSERPASS'),
'HOST': 'localhost',
'PORT': '',
}
}

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT = str(APPS_DIR('staticfiles'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/'

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
STATICFILES_DIRS = (
str(APPS_DIR.path('static')),
str(APPS_DIR.path('static/css/')),
str(APPS_DIR.path('static/js/')),
)

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# MEDIA CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
MEDIA_ROOT = str(APPS_DIR('media'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = '/media/'


# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application

# PASSWORD VALIDATION
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
# ------------------------------------------------------------------------------

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]

# AUTHENTICATION CONFIGURATION
# ------------------------------------------------------------------------------
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)

USE_X_FORWARDED_HOST = True
SITE_ID = 1
AUTH_USER_MODEL='users.User'
# Some really nice defaults
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'

ACCOUNT_ALLOW_REGISTRATION = env.bool('DJANGO_ACCOUNT_ALLOW_REGISTRATION', True)


# Custom user app defaults
# Select the correct user model
# AUTH_USER_MODEL = 'users.User'
LOGIN_REDIRECT_URL = '/main'

LOGIN_URL = 'account_login'

ACCOUNT_SIGNUP_FORM_CLASS = 'users.forms.SignupForm'
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
ADMIN_URL = r'^admin/'

# Your common stuff: Below this line define 3rd party library settings
# ------------------------------------------------------------------------------
ACCOUNT_LOGOUT_ON_GET = True

DEFAULT_EMAIL_FROM = 'no-reply@kidzschool.com'
EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = env('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')









share|improve this question




















  • 3




    Could you edit your answer formatting your error correctly, please? It is very hard to read.
    – Carlo Federico Vescovo
    Nov 11 at 20:48












  • i did really sorry i am new to this
    – Udaya Pratap
    Nov 11 at 21:23










  • Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
    – Carlo Federico Vescovo
    Nov 11 at 21:37










  • thanks you :) ..
    – Udaya Pratap
    Nov 11 at 21:39






  • 1




    Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
    – FlipperPA
    Nov 11 at 22:20















up vote
-2
down vote

favorite
2












    Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 3, in <module>
from celery import Celery
ImportError: No module named celery


i just installed pip install celery now i am facing other issue



(triad_realty) root@webettonew:~/triad_realty# python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 10, in <module>
app = Celery('triad_realty',broker=settings.CELERY_BROKER_URL)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/settings.py", line 17, in <module>
ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
AttributeError: 'module' object has no attribute 'Path'


i am struggling to fix this issue please if anybody could help me right away.



i did install environ though the command pip install environ but maybe i need to change the environ.Path but to what if anybody could help me out i would be very thankful i am whole day stuck at it



i am sharing my settings.py file



"""
Django settings for triad_realty project.

Generated by 'django-admin startproject' using Django 1.9.8.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from __future__ import absolute_import, unicode_literals

import environ

ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
APPS_DIR = ROOT_DIR.path('triad_realty')

# Global Variable Type
env_path = str(ROOT_DIR.path('.env'))
env = environ.Env()
environ.Env.read_env(env_path)

WEBSITE=env("WEBSITE")

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'i%be$q6@6@79z(54hvmn#2@6kdygctob2$n!&l-^%9s#h_u(^o'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Apps
'users',
'investor',
'projectowner',
'detail',
'allauth', # registration
'allauth.account',
'django.contrib.humanize',# registration
'djcelery',
'djcelery_email',
]

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'triad_realty.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [str(APPS_DIR.path('templates')),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/'

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


WSGI_APPLICATION = 'triad_realty.wsgi.application'

FIXTURE_DIRS = (
str(APPS_DIR.path('fixtures')),
)

EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend')

# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
if env('DEPLOYMENT') == "testing":
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DBNAME'),
'USER': env('DBUSER'),
'PASSWORD': env('DBUSERPASS'),
'HOST': 'localhost',
'PORT': '',
}
}

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT = str(APPS_DIR('staticfiles'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/'

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
STATICFILES_DIRS = (
str(APPS_DIR.path('static')),
str(APPS_DIR.path('static/css/')),
str(APPS_DIR.path('static/js/')),
)

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# MEDIA CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
MEDIA_ROOT = str(APPS_DIR('media'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = '/media/'


# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application

# PASSWORD VALIDATION
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
# ------------------------------------------------------------------------------

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]

# AUTHENTICATION CONFIGURATION
# ------------------------------------------------------------------------------
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)

USE_X_FORWARDED_HOST = True
SITE_ID = 1
AUTH_USER_MODEL='users.User'
# Some really nice defaults
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'

ACCOUNT_ALLOW_REGISTRATION = env.bool('DJANGO_ACCOUNT_ALLOW_REGISTRATION', True)


# Custom user app defaults
# Select the correct user model
# AUTH_USER_MODEL = 'users.User'
LOGIN_REDIRECT_URL = '/main'

LOGIN_URL = 'account_login'

ACCOUNT_SIGNUP_FORM_CLASS = 'users.forms.SignupForm'
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
ADMIN_URL = r'^admin/'

# Your common stuff: Below this line define 3rd party library settings
# ------------------------------------------------------------------------------
ACCOUNT_LOGOUT_ON_GET = True

DEFAULT_EMAIL_FROM = 'no-reply@kidzschool.com'
EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = env('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')









share|improve this question




















  • 3




    Could you edit your answer formatting your error correctly, please? It is very hard to read.
    – Carlo Federico Vescovo
    Nov 11 at 20:48












  • i did really sorry i am new to this
    – Udaya Pratap
    Nov 11 at 21:23










  • Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
    – Carlo Federico Vescovo
    Nov 11 at 21:37










  • thanks you :) ..
    – Udaya Pratap
    Nov 11 at 21:39






  • 1




    Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
    – FlipperPA
    Nov 11 at 22:20













up vote
-2
down vote

favorite
2









up vote
-2
down vote

favorite
2






2





    Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 3, in <module>
from celery import Celery
ImportError: No module named celery


i just installed pip install celery now i am facing other issue



(triad_realty) root@webettonew:~/triad_realty# python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 10, in <module>
app = Celery('triad_realty',broker=settings.CELERY_BROKER_URL)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/settings.py", line 17, in <module>
ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
AttributeError: 'module' object has no attribute 'Path'


i am struggling to fix this issue please if anybody could help me right away.



i did install environ though the command pip install environ but maybe i need to change the environ.Path but to what if anybody could help me out i would be very thankful i am whole day stuck at it



i am sharing my settings.py file



"""
Django settings for triad_realty project.

Generated by 'django-admin startproject' using Django 1.9.8.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from __future__ import absolute_import, unicode_literals

import environ

ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
APPS_DIR = ROOT_DIR.path('triad_realty')

# Global Variable Type
env_path = str(ROOT_DIR.path('.env'))
env = environ.Env()
environ.Env.read_env(env_path)

WEBSITE=env("WEBSITE")

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'i%be$q6@6@79z(54hvmn#2@6kdygctob2$n!&l-^%9s#h_u(^o'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Apps
'users',
'investor',
'projectowner',
'detail',
'allauth', # registration
'allauth.account',
'django.contrib.humanize',# registration
'djcelery',
'djcelery_email',
]

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'triad_realty.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [str(APPS_DIR.path('templates')),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/'

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


WSGI_APPLICATION = 'triad_realty.wsgi.application'

FIXTURE_DIRS = (
str(APPS_DIR.path('fixtures')),
)

EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend')

# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
if env('DEPLOYMENT') == "testing":
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DBNAME'),
'USER': env('DBUSER'),
'PASSWORD': env('DBUSERPASS'),
'HOST': 'localhost',
'PORT': '',
}
}

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT = str(APPS_DIR('staticfiles'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/'

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
STATICFILES_DIRS = (
str(APPS_DIR.path('static')),
str(APPS_DIR.path('static/css/')),
str(APPS_DIR.path('static/js/')),
)

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# MEDIA CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
MEDIA_ROOT = str(APPS_DIR('media'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = '/media/'


# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application

# PASSWORD VALIDATION
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
# ------------------------------------------------------------------------------

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]

# AUTHENTICATION CONFIGURATION
# ------------------------------------------------------------------------------
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)

USE_X_FORWARDED_HOST = True
SITE_ID = 1
AUTH_USER_MODEL='users.User'
# Some really nice defaults
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'

ACCOUNT_ALLOW_REGISTRATION = env.bool('DJANGO_ACCOUNT_ALLOW_REGISTRATION', True)


# Custom user app defaults
# Select the correct user model
# AUTH_USER_MODEL = 'users.User'
LOGIN_REDIRECT_URL = '/main'

LOGIN_URL = 'account_login'

ACCOUNT_SIGNUP_FORM_CLASS = 'users.forms.SignupForm'
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
ADMIN_URL = r'^admin/'

# Your common stuff: Below this line define 3rd party library settings
# ------------------------------------------------------------------------------
ACCOUNT_LOGOUT_ON_GET = True

DEFAULT_EMAIL_FROM = 'no-reply@kidzschool.com'
EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = env('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')









share|improve this question















    Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 3, in <module>
from celery import Celery
ImportError: No module named celery


i just installed pip install celery now i am facing other issue



(triad_realty) root@webettonew:~/triad_realty# python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/__init__.py", line 1, in <module>
from .celery import app as celery_app
File "/root/triad_realty/triad_realty/celery.py", line 10, in <module>
app = Celery('triad_realty',broker=settings.CELERY_BROKER_URL)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/root/triad_realty/triad_realty/local/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/root/triad_realty/triad_realty/settings.py", line 17, in <module>
ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
AttributeError: 'module' object has no attribute 'Path'


i am struggling to fix this issue please if anybody could help me right away.



i did install environ though the command pip install environ but maybe i need to change the environ.Path but to what if anybody could help me out i would be very thankful i am whole day stuck at it



i am sharing my settings.py file



"""
Django settings for triad_realty project.

Generated by 'django-admin startproject' using Django 1.9.8.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from __future__ import absolute_import, unicode_literals

import environ

ROOT_DIR = environ.Path(__file__) -2 # (triad_realty/config/settings/common.py - 3 = triad_realty/)
APPS_DIR = ROOT_DIR.path('triad_realty')

# Global Variable Type
env_path = str(ROOT_DIR.path('.env'))
env = environ.Env()
environ.Env.read_env(env_path)

WEBSITE=env("WEBSITE")

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'i%be$q6@6@79z(54hvmn#2@6kdygctob2$n!&l-^%9s#h_u(^o'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Apps
'users',
'investor',
'projectowner',
'detail',
'allauth', # registration
'allauth.account',
'django.contrib.humanize',# registration
'djcelery',
'djcelery_email',
]

MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'triad_realty.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [str(APPS_DIR.path('templates')),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672/'

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


WSGI_APPLICATION = 'triad_realty.wsgi.application'

FIXTURE_DIRS = (
str(APPS_DIR.path('fixtures')),
)

EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend')

# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
if env('DEPLOYMENT') == "testing":
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DBNAME'),
'USER': env('DBUSER'),
'PASSWORD': env('DBUSERPASS'),
'HOST': 'localhost',
'PORT': '',
}
}

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root

# STATIC FILE CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT = str(APPS_DIR('staticfiles'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = '/static/'

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
STATICFILES_DIRS = (
str(APPS_DIR.path('static')),
str(APPS_DIR.path('static/css/')),
str(APPS_DIR.path('static/js/')),
)

# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# MEDIA CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
MEDIA_ROOT = str(APPS_DIR('media'))

# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = '/media/'


# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application

# PASSWORD VALIDATION
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
# ------------------------------------------------------------------------------

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]

# AUTHENTICATION CONFIGURATION
# ------------------------------------------------------------------------------
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)

USE_X_FORWARDED_HOST = True
SITE_ID = 1
AUTH_USER_MODEL='users.User'
# Some really nice defaults
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'

ACCOUNT_ALLOW_REGISTRATION = env.bool('DJANGO_ACCOUNT_ALLOW_REGISTRATION', True)


# Custom user app defaults
# Select the correct user model
# AUTH_USER_MODEL = 'users.User'
LOGIN_REDIRECT_URL = '/main'

LOGIN_URL = 'account_login'

ACCOUNT_SIGNUP_FORM_CLASS = 'users.forms.SignupForm'
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
ADMIN_URL = r'^admin/'

# Your common stuff: Below this line define 3rd party library settings
# ------------------------------------------------------------------------------
ACCOUNT_LOGOUT_ON_GET = True

DEFAULT_EMAIL_FROM = 'no-reply@kidzschool.com'
EMAIL_USE_SSL = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = env('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')






python django python-2.7






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 21:23

























asked Nov 11 at 20:42









Udaya Pratap

11




11








  • 3




    Could you edit your answer formatting your error correctly, please? It is very hard to read.
    – Carlo Federico Vescovo
    Nov 11 at 20:48












  • i did really sorry i am new to this
    – Udaya Pratap
    Nov 11 at 21:23










  • Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
    – Carlo Federico Vescovo
    Nov 11 at 21:37










  • thanks you :) ..
    – Udaya Pratap
    Nov 11 at 21:39






  • 1




    Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
    – FlipperPA
    Nov 11 at 22:20














  • 3




    Could you edit your answer formatting your error correctly, please? It is very hard to read.
    – Carlo Federico Vescovo
    Nov 11 at 20:48












  • i did really sorry i am new to this
    – Udaya Pratap
    Nov 11 at 21:23










  • Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
    – Carlo Federico Vescovo
    Nov 11 at 21:37










  • thanks you :) ..
    – Udaya Pratap
    Nov 11 at 21:39






  • 1




    Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
    – FlipperPA
    Nov 11 at 22:20








3




3




Could you edit your answer formatting your error correctly, please? It is very hard to read.
– Carlo Federico Vescovo
Nov 11 at 20:48






Could you edit your answer formatting your error correctly, please? It is very hard to read.
– Carlo Federico Vescovo
Nov 11 at 20:48














i did really sorry i am new to this
– Udaya Pratap
Nov 11 at 21:23




i did really sorry i am new to this
– Udaya Pratap
Nov 11 at 21:23












Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
– Carlo Federico Vescovo
Nov 11 at 21:37




Don't worry, you edited the question correctly. Remember we were all just beginners in the past. SO is not very beginner friendly but is trying to get better and better every day.
– Carlo Federico Vescovo
Nov 11 at 21:37












thanks you :) ..
– Udaya Pratap
Nov 11 at 21:39




thanks you :) ..
– Udaya Pratap
Nov 11 at 21:39




1




1




Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
– FlipperPA
Nov 11 at 22:20




Welcome to SO! I noticed you're running Django 1.9.8, which is no longer supported. If you're starting a new project or just learning Django, I'd strongly recommend to start with Python 3, and Django 2.1, the most recent versions. There have been some major improvements in the past few versions to make things easier for newcomers, specifically the new URL routing syntax.
– FlipperPA
Nov 11 at 22:20












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Have you tried installing Celery into your Python environment?



pip install celery






share|improve this answer





















  • hello thanks i did this but now i am facing new issue i did change this in the main part
    – Udaya Pratap
    Nov 11 at 21:23












  • Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
    – Graham Healy
    Nov 13 at 12:53











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253033%2fpython-runserver-django-script-not-starting%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Have you tried installing Celery into your Python environment?



pip install celery






share|improve this answer





















  • hello thanks i did this but now i am facing new issue i did change this in the main part
    – Udaya Pratap
    Nov 11 at 21:23












  • Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
    – Graham Healy
    Nov 13 at 12:53















up vote
0
down vote













Have you tried installing Celery into your Python environment?



pip install celery






share|improve this answer





















  • hello thanks i did this but now i am facing new issue i did change this in the main part
    – Udaya Pratap
    Nov 11 at 21:23












  • Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
    – Graham Healy
    Nov 13 at 12:53













up vote
0
down vote










up vote
0
down vote









Have you tried installing Celery into your Python environment?



pip install celery






share|improve this answer












Have you tried installing Celery into your Python environment?



pip install celery







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 20:45









Graham Healy

515




515












  • hello thanks i did this but now i am facing new issue i did change this in the main part
    – Udaya Pratap
    Nov 11 at 21:23












  • Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
    – Graham Healy
    Nov 13 at 12:53


















  • hello thanks i did this but now i am facing new issue i did change this in the main part
    – Udaya Pratap
    Nov 11 at 21:23












  • Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
    – Graham Healy
    Nov 13 at 12:53
















hello thanks i did this but now i am facing new issue i did change this in the main part
– Udaya Pratap
Nov 11 at 21:23






hello thanks i did this but now i am facing new issue i did change this in the main part
– Udaya Pratap
Nov 11 at 21:23














Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
– Graham Healy
Nov 13 at 12:53




Looking at your settings.py, it seems that you are using django environ (django-environ.readthedocs.io/en/latest/#environ-path). Maybe you should re-install the correct version of that package for the version of Django you are using (1.9.8)? I ran the following and it worked for me pip install django-environ and import environ; environ.Path(__name__)
– Graham Healy
Nov 13 at 12:53


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253033%2fpython-runserver-django-script-not-starting%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

The Sandy Post

Danny Elfman

Pages that link to "Head v. Amoskeag Manufacturing Co."