Dash app passing debug to flask

Hi. I have deployed my website on python anywhere as it was working locally.

However I now have an issue that has only shown up after deployment.

The webapp has three plotly dash apps that have been configured with Django-plotly-Dash, they work locally.

The error log provides the following:

  File "/home/TheBoatShed/.virtualenvs/myenv/lib/python3.9/site-packages/dash/dash.py", line 494, in __init__
 File "/home/TheBoatShed/.virtualenvs/myenv/lib/python3.9/site-packages/dash/dash.py", line 558, in init_app
File "/home/TheBoatShed/.virtualenvs/myenv/lib/python3.9/site-packages/flask/scaffold.py", line 39, in wrapper_func
if self._is_setup_finished():
File "/home/TheBoatShed/.virtualenvs/myenv/lib/python3.9/site-packages/flask/app.py", line 517, in _is_setup_finished
return self.debug and self._got_first_request
File "/home/TheBoatShed/.virtualenvs/myenv/lib/python3.9/site-packages/flask/app.py", line 792, in debug
return self.config["DEBUG"]

KeyError: 'DEBUG

DEBUG is set to False in Settings.py. and the WSGI file has the following

# +++++++++++ DJANGO +++++++++++
# To use your own django app use code like this:
import os
import sys
## assuming your django settings file is at '/home/TheBoatShed/mysite/mysite/settings.py'
## and your manage.py is is at '/home/TheBoatShed/mysite/manage.py'
path = '/home/TheBoatShed/demo'
if path not in sys.path:
os.environ['DJANGO_SETTINGS_MODULE'] = 'demosite.settings'

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

My assumption is that flask is not reading the debug setting in the settings file. I have tried to add locally in the files however as per the Flask docs this has not worked.

Does anyone have any suggestions I could try.