Forums

Error running WSGI application -

ModuleNotFoundError: No module named 'support_control'

2023-01-06 14:32:03,337:   File "/var/www/www_listen2meet_fr_wsgi.py", line 15, in <module>
2023-01-06 14:32:03,337:     application = get_wsgi_application()
2023-01-06 14:32:03,337: 
2023-01-06 14:32:03,337:   File "/home/mikerault/listen2meet/.env/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2023-01-06 14:32:03,337:     django.setup(set_prefix=False)
2023-01-06 14:32:03,337: 
2023-01-06 14:32:03,337:   File "/home/mikerault/listen2meet/.env/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
2023-01-06 14:32:03,337:     apps.populate(settings.INSTALLED_APPS)
2023-01-06 14:32:03,338:   File "/home/mikerault/listen2meet/.env/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
2023-01-06 14:32:03,338:     app_config = AppConfig.create(entry)
2023-01-06 14:32:03,338: 
2023-01-06 14:32:03,338:   File "/home/mikerault/listen2meet/.env/lib/python3.9/site-packages/django/apps/config.py", line 228, in create
2023-01-06 14:32:03,338:     import_module(entry)

I try to delete this app support_control app but I have this problem. How to solve it ?

[edit by admin: formatting]

It looks like you have deleted it, but you still have a reference to it in your Django settings.py, or some other code in your site that is trying to import it.

The problem is always here !

I already try to find "support_control" on this :

import os
import environ
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
env = environ.Env()
environ.Env.read_env(env_file=str(BASE_DIR / "listen2meet" / ".env"))
SECRET_KEY = env("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env.bool("DEBUG")
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS")
# Application definition


INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'contexte',
    'l2play',
    'rencontre',
    'solutions',
    'equipes',
    'support',
    'legal',
    'security',
    'who',
]

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


MIDDLEWARE_CLASSES = (
    # Other middleware classes go here
    'responsive.middleware.DeviceInfoMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    # Other context processors included here
    'responsive.context_processors.device_info',
)

ROOT_URLCONF = 'listen2meet.urls'



TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'listen2meet/templates'),
                    os.path.join(BASE_DIR, 'contexte/templates'),
                    os.path.join(BASE_DIR, 'rencontre/templates'),
                    os.path.join(BASE_DIR, 'l2play/templates'),
                    os.path.join(BASE_DIR, 'solutions/templates'),
                    os.path.join(BASE_DIR, 'equipes/templates'),
                    os.path.join(BASE_DIR, 'support/templates'),
                    os.path.join(BASE_DIR, 'who/templates'),
                    os.path.join(BASE_DIR, 'legal/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',
            ],
        },
    },
]

WSGI_APPLICATION = 'listen2meet.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

DATABASES = {
    'default': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': BASE_DIR / 'db.sqlite3',
    }
}

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',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/

LANGUAGE_CODE = 'fr-FR'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True

# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'staticfiles'

MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'mediafiles'

AUTHENTICATION_BACKENDS = [
    'django.contrib.auth.backends.ModelBackend',
    'allauth.account.auth_backends.AuthenticationBackend'
]


SOCIALACCOUNT_PROVIDERS = {
    'google': {
        'SCOPE': [
            'profile',
            'email',
        ],
        'AUTH_PARAMS': {
            'access_type': 'online',
        }
    }
}

Do you have another idea ?

[edit by admin: formatting]

Perhaps you can use grep to see if that module is referenced anywhere in the code? To do that

  • Start a Bash console
  • cd to the directory containing your manage.py
  • run this (note that the dot at the end is important)
    grep -Iir support_control .
    

Thanks for all, the problem is solved.

Great, glad we could help!