Forums

Error running WSGI application

2016-07-27 02:38:54,358 :Error running WSGI application Traceback (most recent call last): File "/bin/user_wsgi_wrapper.py", line 154, in call app_iterator = self.app(environ, start_response) File "/bin/user_wsgi_wrapper.py", line 170, in import_error_application raise e ImportError: No module named wsgi

Hi there,

Make sure you have the right version of django? Going to your website, it seems like you have solved this problem and you are onto the next one?

Conrad

Hi,

How did this problem been solved? I've gotten the same error in my flask application.

Hi,

Can any PythonAnyWhere staff help to answer this topic?

The django version mismatch I mentioned is in the wsgi.py For django 1.7+, this is correct:

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

for django <1.7, this is correct:

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

For flask, you want to import your app (ie. the app = Flask(__name__) that you have somewhere) and then save it as application in your wsgi.py

This is the settings that worked for me - this goes in your WSGI configuration file.

if path not in sys.path:
    sys.path.append(path)

from django.core.wsgi import get_wsgi_application
from django.contrib.staticfiles.handlers import StaticFilesHandler
application = StaticFilesHandler(get_wsgi_application())

Hi, can u please check this up for my site: Getting the following error msg: Error running WSGI application OSError: write error GeneratorExit

Those are safe to ignore: https://help.pythonanywhere.com/pages/GeneratorExit

A clarification -- those errors are normally safe to ignore, if you're only seeing them occasionally. If you're seeing lots of them (say, one per second) then it may be a signal that your web app is running too slowly. This could be caused by many different things -- a frequent cause is if you write a view that, when it is accessed, it makes a request to an external site, and that external site is running slowly. Or it could be a bug elsewhere in your code making it do an infinite loop -- or something like that.

ImportError: No module named django.core.wsgi

I see your web app is using a virtualenv. Have you installed Django into the env?

YES

Can I take a look at your files? We can see them from our admin interface, but we always ask for permission first.

okk

okk

You've somehow created a virtualenv that has both Python 3.5 and 2.7 packages installed and you've only installed Django into the 3.5 version where your web app is using 2.7.

So, What I need to do?

Recreate your virtualenv with only Python 2.7 and with Django installed.

If you can. Please do it for me I am very thankful of you please make it live.

We're glad to help you work out what you did wrong and what you need to do to fix it, but we don't do it for you.

i have done but still getting error.

What error?

wsgi error

What is the actual error? "wsgi error" could mean anything.

Error running WSGI application 2017-09-01 14:56:10,093: ImportError: No module named django.core.wsgi 2017-09-01 14:56:10,093: File "/var/www/jks9650_pythonanywhere_com_wsgi.py", line 60, in <module> 2017-09-01 14:56:10,093: from django.core.wsgi import get_wsgi_application

it shows same error line 60 if there is only 16 or 17 line of code.

That error is from 3 days ago. I'm pretty sure it's not useful for the current issue.

means what ???

Hi there, just picking up on this while Glenn is elsewhere. We have some debugging tips for common problems with imports here: https://help.pythonanywhere.com/pages/DebuggingImportError

Can I ask you to try them out and report back what you discover?

ImportError: No module named 'django' and also error running vsgi application.

ImportError: No module named 'django' and also error running Wsgi application.

ImportError: No module named 'django' and also error running Wsgi application.

Are you using a virtualenv? If so, have you specified it on the "Web" tab? And have you installed Django into the env?

Error running WSGI application ModuleNotFoundError: No module named 'locallibrary.settings'

I get this error in my error log. I dont know how to handle it.

See https://help.pythonanywhere.com/pages/DebuggingImportError/

It Help me a lot !! <3

Error running WSGI application ModuleNotFoundError: No module named 'flask_cors' File "/var/www/chandler_pythonanywhere_com_wsgi.py", line 16, in <module> from gui import app as application

and i have required version of flask_cors installed on my system. Please help.

Are you sure that the package is installed for the python version/virtual environment you run your web app with?

can you please look at my error I'm a beginner and this is my first time please help I can't understand from the error log

What is your error?

can you please look in my code it keeps printing error

Error running WSGI application
AttributeError: module 'augustusnyaangaportfolio_pythonanywhere_com_wsgi' has no attribute 'application'

[edited by admin: formatting]

Do you still get this error? It looks like your web app is running right now.

.

Error running WSGI application
2021-04-18 05:25:19,225: ModuleNotFoundError: No module named 'social_django'
2021-04-18 05:25:19,225:   File "/var/www/kyf2021_pythonanywhere_com_wsgi.py", line 41, in <module>
2021-04-18 05:25:19,225:     application = get_wsgi_application()
2021-04-18 05:25:19,225: 
2021-04-18 05:25:19,225:   File "/home/kyf2021/.virtualenvs/ifmark_env/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-04-18 05:25:19,225:     django.setup(set_prefix=False)
2021-04-18 05:25:19,226: 
2021-04-18 05:25:19,226:   File "/home/kyf2021/.virtualenvs/ifmark_env/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
2021-04-18 05:25:19,226:     apps.populate(settings.INSTALLED_APPS)
2021-04-18 05:25:19,226: 
2021-04-18 05:25:19,226:   File "/home/kyf2021/.virtualenvs/ifmark_env/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
2021-04-18 05:25:19,226:     app_config = AppConfig.create(entry)
2021-04-18 05:25:19,226: 
2021-04-18 05:25:19,226:   File "/home/kyf2021/.virtualenvs/ifmark_env/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
2021-04-18 05:25:19,227:     module = import_module(entry)

such error coming

[edit by admin: formatting]

It looks like you don't have social_django installed in the virtualenv your site is using. If you start a Bash console in the virtualenv using the link on the "Web" page and run pip install social-auth-app-django that should fix the problem.

Error running WSGI application 2022-02-13 23:43:40,026: ModuleNotFoundError: No module named 'dotenv' 2022-02-13 23:43:40,026: File "/var/www/www_anythingpython_com_wsgi.py", line 37, in <module> 2022-02-13 23:43:40,027: application = get_wsgi_application() 2022-02-13 23:43:40,027: 2022-02-13 23:43:40,027: File "/home/sirvingeophysicist/.virtualenvs/myenv/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2022-02-13 23:43:40,027: django.setup(set_prefix=False) 2022-02-13 23:43:40,027: 2022-02-13 23:43:40,027: File "/home/sirvingeophysicist/.virtualenvs/myenv/lib/python3.9/site-packages/django/init.py", line 19, in setup 2022-02-13 23:43:40,027: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2022-02-13 23:43:40,027: 2022-02-13 23:43:40,027: File "/home/sirvingeophysicist/.virtualenvs/myenv/lib/python3.9/site-packages/django/conf/init.py", line 84, in getattr 2022-02-13 23:43:40,027: self._setup(name) 2022-02-13 23:43:40,028: 2022-02-13 23:43:40,028: File "/home/sirvingeophysicist/.virtualenvs/myenv/lib/python3.9/site-packages/django/conf/init.py", line 71, in _setup 2022-02-13 23:43:40,028: self._wrapped = Settings(settings_module) 2022-02-13 23:43:40,028: 2022-02-13 23:43:40,028: File "/home/sirvingeophysicist/.virtualenvs/myenv/lib/python3.9/site-packages/django/conf/init.py", line 179, in init 2022-02-13 23:43:40,028: mod = importlib.import_module(self.SETTINGS_MODULE) 2022-02-13 23:43:40,028: 2022-02-13 23:43:40,028: File "/home/sirvingeophysicist/blogg/djangoblog/settings.py", line 24, in <module> 2022-02-13 23:43:40,028: from dotenv import load_dotenv

I have already installed the python-dotenv on my virtualenv but its still giving me this error . i need help

Was it the correct virtualenv that you use in your web app?

has anyone found the solution for this problem ?

Most of users found solutions to the multiple problems mentioned in that thread. What is your specific one?

Anyone have suggestions for this error?

Error running WSGI application TypeError: expected str, bytes or os.PathLike object, not NoneType

How does your code look like?

My views code is this, which launches my portfolio.html template

def portfolio(request, pk):
    customer = get_object_or_404(Customer, pk=pk)
    customers = Customer.objects.filter(created_date__lte=timezone.now())
    investments = Investment.objects.filter(customer=pk)
    stocks = Stock.objects.filter(customer=pk)
    sum_recent_value = Investment.objects.filter(customer=pk).aggregate(Sum('recent_value'))
    sum_acquired_value = Investment.objects.filter(customer=pk).aggregate(Sum('acquired_value'))
    # overall_investment_results = sum_recent_value-sum_acquired_value
    # Initialize the value of the stocks
    sum_current_stocks_value = 0
    sum_of_initial_stock_value = 0

# Loop through each stock and add the value to the total

for stock in stocks:
    sum_current_stocks_value += stock.current_stock_value()
    sum_of_initial_stock_value += stock.initial_stock_value()

convert_base_url = 'http://api.currencylayer.com/live?access_key='
convert_api_key = '47497ce5e63b916a36741a1ad2b44c4a'
convert_currency = '&currencies=EUR'
convert_url = convert_base_url + convert_api_key + convert_currency
rates = requests.get(convert_url).json()
eur_conv_rate = rates["quotes"]["USDEUR"]

return render(request, 'portfolio/portfolio.html', {'customers': customers,
                                                    'investments': investments,
                                                    'stocks': stocks,
                                                    'sum_acquired_value': sum_acquired_value,
                                                    'sum_recent_value': sum_recent_value,
                                                    'sum_current_stocks_value': sum_current_stocks_value,
                                                    'sum_of_initial_stock_value': sum_of_initial_stock_value,
                                                    'euros': eur_conv_rate, })

That does not look like the code that causes that error. What is the full error message from your log?

Can you see my error log if I give you the link? https://www.pythonanywhere.com/user/hdavis3/files/var/log/hdavis3.pythonanywhere.com.error.log

Yes, as admins we can look into the log files. The most recent error I see is ModuleNotFoundError: No module named 'crispy_forms'. We have a help page on debugging those errors.

I need help. I am attempting to deploy my web app and I am met with this:

Error running WSGI application
2022-07-07 12:21:30,289: ModuleNotFoundError: No module named 'flask'
2022-07-07 12:21:30,289:   File "/var/www/hazlettkenneth1_pythonanywhere_com_wsgi.py", line 83, in <module>
2022-07-07 12:21:30,290:     from flask_app import app  # noqa
2022-07-07 12:21:30,290: 
2022-07-07 12:21:30,291:   File "/home/hazlettkenneth1/Dream-Recorder/flask_app/__init__.py", line 1, in <module>
2022-07-07 12:21:30,291:     from flask import Flask
2022-07-07 12:21:30,291: ***************************************************
2022-07-07 12:21:30,291: If you're seeing an import error and don't know why,
2022-07-07 12:21:30,292: we have a dedicated help page to help you debug: 
2022-07-07 12:21:30,292: https://help.pythonanywhere.com/pages/DebuggingImportError/

I have gone over the dedicated page and I am now here asking for help. Thanks!

[edit by admin: formatting]

It looks like you've specified a virtualenv for your website, so you'll need to install Flask into it -- start a Bash console inside the virtualenv using the link on the "Web" page, then run

pip install flask

...then reload your website from the button on the "Web" page.

please can i get help with this? i have tried installing the django-extensopns module on the virtual enviroment but after doing so i still get this error:

Error running WSGI application
2022-10-14 01:57:32,618: ModuleNotFoundError: No module named 'django_extensions'
2022-10-14 01:57:32,618:   File "/var/www/elorey_pythonanywhere_com_wsgi.py", line 17, in <module>
2022-10-14 01:57:32,618:     application = StaticFilesHandler(get_wsgi_application())
2022-10-14 01:57:32,618: 
2022-10-14 01:57:32,618:   File "/home/Elorey/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-10-14 01:57:32,618:     django.setup(set_prefix=False)
2022-10-14 01:57:32,618: 
2022-10-14 01:57:32,619:   File "/home/Elorey/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
2022-10-14 01:57:32,619:     apps.populate(settings.INSTALLED_APPS)
2022-10-14 01:57:32,619: 
2022-10-14 01:57:32,619:   File "/home/Elorey/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
2022-10-14 01:57:32,619:     app_config = AppConfig.create(entry)
2022-10-14 01:57:32,619: 
2022-10-14 01:57:32,619:   File "/home/Elorey/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/django/apps/config.py", line 224, in create
2022-10-14 01:57:32,619:     import_module(entry)

Make sure that the venv was activated, before you installed the package. You can always check this by activating the venv (e.g. workon myvirtualenv) and then pip show django_extensions. Also, when you're installing a package, check if the output is showing that it was successfully installed.


2022-11-25 17:37:08,659: Error running WSGI application 2022-11-25 17:37:08,661: RuntimeError: The scheduler seems to be running under uWSGI, but threads have been disabled. You must run uWSGI with the --enable-threads option for the scheduler to work. 2022-11-25 17:37:08,662: File "/var/www/tester42_pythonanywhere_com_wsgi.py", line 17, in <module> 2022-11-25 17:37:08,662: application = get_wsgi_application() 2022-11-25 17:37:08,662:

I am having issue with this.

Threads are not supported in PythonAnywhere web apps.

Error running WSGI application 2022-11-27 00:49:09,054: ModuleNotFoundError: No module named 'debug_toolbar'

Friends , what to do about it .. ? I 've tried many ways , but nothing helps

Друзья , что с этим делать .. ? Перепробовал много способов , но ничто не помагает

@tester42 -- if you're trying to schedule things, then you should use the "Tasks" page inside PythonAnywhere, rather than running it inside the website's code. Websites on PythonAnywhere can run as a number of processes on different machines at different times, so even if we did enable threads, you could wind up with multiple instances of the scheduler running if you did it there.

@rishik -- it looks like you need to install the Python package that provides that module; see this help page.

Error running WSGI application ModuleNotFoundError: No module named 'config.settings' File "/var/www/astoriy_pythonanywhere_com_wsgi.py", line 89, in <module> application = get_wsgi_application()

What am I doing wrong? it complains that there is no "config.settings" module when on local server everything works fine

Did you reload the web app after updating paths in the wsgi file?

yes, ofc. you can look at my logs, but they write my error

How does your path to settings look like? What do you add to the sys.path in your wsgi file?

path = '/home/Astoriy/twilio-verify/twilioauthsite'

if path not in sys.path: sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'

i noticed my wsgi.py file is different in this link https://www.pythonanywhere.com/user/Astoriy/files/var/www/astoriy_pythonanywhere_com_wsgi.py?edit and in bash console when i watch it through vim wsgi.py, is it supposed to be like this?

/var/www/astoriy_pythonanywhere_com_wsgi.py is the file you need to look at.

What is the full path to the settings.py file?

where can i watch it?

here is the path /home/Astoriy/twilio-verify/twilioauthsite/config, but where should it be specified?

In the wsgi file that is linked to from your web app configuration page. See https://help.pythonanywhere.com/pages/DeployExistingDjangoProject/#edit-your-wsgi-file

if this is it, then I already threw it off:

path = '/home/Astoriy/twilio-verify/twilioauthsite'

if path not in sys.path:

sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'

That configuration is specifying that your settings file is at /home/Astoriy/twilio-verify/twilioauthsite/config/settings.py. Is it?

yes

Then I would suggest working through the debugging process here: https://help.pythonanywhere.com/pages/DebuggingImportError/

I have this problem in my application

2023-03-16 15:23:05,841: Error running WSGI application 2023-03-16 15:23:05,841: ModuleNotFoundError: No module named 'tareas' 2023-03-16 15:23:05,842: File "/var/www/tecnmmorelia_pythonanywhere_com_wsgi.py", line 15, in <module> 2023-03-16 15:23:05,842: application = get_wsgi_application() 2023-03-16 15:23:05,842: 2023-03-16 15:23:05,842: File "/home/tecnmmorelia/.virtualenvs/django1/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2023-03-16 15:23:05,842: django.setup(set_prefix=False) 2023-03-16 15:23:05,843: 2023-03-16 15:23:05,843: File "/home/tecnmmorelia/.virtualenvs/django1/lib/python3.9/site-packages/django/init.py", line 19, in setup 2023-03-16 15:23:05,843: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2023-03-16 15:23:05,843: 2023-03-16 15:23:05,843: File "/home/tecnmmorelia/.virtualenvs/django1/lib/python3.9/site-packages/django/conf/init.py", line 92, in getattr 2023-03-16 15:23:05,843: self._setup(name) 2023-03-16 15:23:05,843: 2023-03-16 15:23:05,844: File "/home/tecnmmorelia/.virtualenvs/django1/lib/python3.9/site-packages/django/conf/init.py", line 79, in _setup 2023-03-16 15:23:05,844: self._wrapped = Settings(settings_module) 2023-03-16 15:23:05,844: 2023-03-16 15:23:05,844: File "/home/tecnmmorelia/.virtualenvs/django1/lib/python3.9/site-packages/django/conf/init.py", line 190, in init 2023-03-16 15:23:05,844: mod = importlib.import_module(self.SETTINGS_MODULE) 2023-03-16 15:23:05,845: ********* 2023-03-16 15:23:05,845: If you're seeing an import error and don't know why, 2023-03-16 15:23:05,845: we have a dedicated help page to help you debug: 2023-03-16 15:23:05,845: https://help.pythonanywhere.com/pages/DebuggingImpor

Consider working through the debugging process here: https://help.pythonanywhere.com/pages/DebuggingImportError/

I'm trying but I can't find a solution this is my wsgi

import os import sys

path = '/home/tecnmmorelia/PendientesITVM/tareas2/tareas' if path not in sys.path: sys.path.append(path)

from django.core.wsgi import get_wsgi_application

os.environ['DJANGO_SETTINGS_MODULE'] = 'tareas.settings'

application = get_wsgi_application()

Also try as indicated on the page

What is the full path to settings.py?

same problem with the last 2, looks like we can't add our path in the WSGI file

same problem with the last 2, looks like we can't add our path in the WSGI file

Could you give more details? I'm not sure what you mean by that.

.

2023-08-29 14:03:57,439: Error running WSGI application
2023-08-29 14:03:57,481: ModuleNotFoundError: No module named 'numpy'
2023-08-29 14:03:57,482:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 124, in __call__
2023-08-29 14:03:57,482:     response = self.get_response(request)
2023-08-29 14:03:57,482: 
2023-08-29 14:03:57,482:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/handlers/base.py", line 140, in get_response
2023-08-29 14:03:57,482:     response = self._middleware_chain(request)
2023-08-29 14:03:57,482: 
2023-08-29 14:03:57,483:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 57, in inner
2023-08-29 14:03:57,483:     response = response_for_exception(request, exc)
2023-08-29 14:03:57,483: 
2023-08-29 14:03:57,483:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 140, in response_for_exception
2023-08-29 14:03:57,483:     response = handle_uncaught_exception(
2023-08-29 14:03:57,483: 
2023-08-29 14:03:57,483:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 181, in handle_uncaught_exception
2023-08-29 14:03:57,484:     return debug.technical_500_response(request, *exc_info)
2023-08-29 14:03:57,484: 
2023-08-29 14:03:57,484:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/views/debug.py", line 67, in technical_500_response
2023-08-29 14:03:57,484:     html = reporter.get_traceback_html()
2023-08-29 14:03:57,484: 
2023-08-29 14:03:57,484:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/views/debug.py", line 410, in get_traceback_html
2023-08-29 14:03:57,485:     c = Context(self.get_traceback_data(), use_l10n=False)
2023-08-29 14:03:57,485: 
2023-08-29 14:03:57,485:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/views/debug.py", line 393, in get_traceback_data
2023-08-29 14:03:57,485:     c["raising_view_name"] = get_caller(self.request)
2023-08-29 14:03:57,485: 
2023-08-29 14:03:57,485:   File "/home/Cdywalst/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/views/debug.py", line 100, in get_caller
2023-08-29 14:03:57,486:     resolver_match = resolve(request.path)
2023-08-29 14:03:57,486:

[edit by admin: formatting]

It looks like you need to install numpy into your virtualenv; start a Bash console in that env by using the link on the "Web" page, then run pip install numpy.

when i install numpy i 'm still getting the same error for other libraries pandas,keras,tensorflow ...Can you check what could be the problem on my website?

Could you share more details? Do you install it in virtualenv?

2023-10-04 14:43:24,984: Error running WSGI application 2023-10-04 14:43:24,988: ModuleNotFoundError: No module named 'Capston_project.settings' 2023-10-04 14:43:24,988: File "/var/www/adeelkhan_pythonanywhere_com_wsgi.py", line 22, in <module> 2023-10-04 14:43:24,988: application = get_wsgi_application()

this is giving me error, but I my project name is c_lemon and i changed it and re run the deployment but it does not work it giving me same error. WSGI_APPLICATION = 'c_lemon.wsgi.application'

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'c_lemon.settings')

application = get_wsgi_application()

i have this on my wsgi file but it show me Capston_project.settings plz tell me how to fix it

Then I would suggest working through the debugging process here: https://help.pythonanywhere.com/pages/DebuggingImportError/

i see this, any ideas why?

2024-01-29 21:24:39,532: Error running WSGI application
2024-01-29 21:24:39,537: ModuleNotFoundError: No module named 'agile'
2024-01-29 21:24:39,537:   File "/var/www/robertanderco_pythonanywhere_com_wsgi.py", line 13, in <module>
2024-01-29 21:24:39,537:     application = get_wsgi_application()
2024-01-29 21:24:39,537: 
2024-01-29 21:24:39,537:   File "/home/robertanderco/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2024-01-29 21:24:39,538:     django.setup(set_prefix=False)
2024-01-29 21:24:39,538: 
2024-01-29 21:24:39,538:   File "/home/robertanderco/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/__init__.py", line 19, in setup
2024-01-29 21:24:39,538:     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2024-01-29 21:24:39,538: 
2024-01-29 21:24:39,538:   File "/home/robertanderco/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/conf/__init__.py", line 102, in __getattr__
2024-01-29 21:24:39,538:     self._setup(name)
2024-01-29 21:24:39,538: 
2024-01-29 21:24:39,538:   File "/home/robertanderco/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/conf/__init__.py", line 89, in _setup
2024-01-29 21:24:39,538:     self._wrapped = Settings(settings_module)
2024-01-29 21:24:39,538: 
2024-01-29 21:24:39,539:   File "/home/robertanderco/.virtualenvs/mysite-virtualenv/lib/python3.10/site-packages/django/conf/__init__.py", line 217, in __init__
2024-01-29 21:24:39,539:     mod = importlib.import_module(self.SETTINGS_MODULE)

[edit by admin: formatting]

In your other forum post you provided this WSGI file code:

import os
import sys
path = '/home/andercorobert/app/agile'
if path not in sys.path:
    sys.path.insert(0, path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'agile.settings'

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

That would try to load your settings from the file /home/andercorobert/app/agile/agile/settings.py -- note the repeated agile. I think that the path you add to sys.path should probably be '/home/andercorobert/app/'.

Error running WSGI application 2024-02-24 11:54:31,763: ModuleNotFoundError: No module named 'gtts' 2024-02-24 11:54:31,763: File "/var/www/mohit1207_pythonanywhere_com_wsgi.py", l

@Mohit1207 what is in your wsgi file that causes error? What is gtts?