The official Discord server for the Flask Reddit community.

Join Server

Community questions




getting this error RuntimeError: No application found. Either work inside a view function or push an application context.

I'm running a script that interacts with my db in isolation. Pythonanywhere lets you have a script that is 'always running' which i use to pull data from an api but i think it means it has no contxt of my databse?

I had a look on google/stackoverflow and it seems to be a project/app structure problem? but i have no idea how to fix it

i somehow need to export my db...

hi guys finally finished my new app

hi guys, finally finished my new app using blueprints just trying to host it now (where i had it before) but getting this error
2022-11-28 10:08:53,939: Error running WSGI application
2022-11-28 10:08:53,942: ImportError: cannot import name 'app' from 'app' (/home/sirix123/sd-games-web-app/app.py)
2022-11-28 10:08:53,942:   File "/var/www/www_sdgames_co_wsgi.py", line 20, in <module>
2022-11-28 10:08:53,942:     from app import app as application  # noqa

contents of wsgi.py
# This f...

Show your code in ` init py`

Show your code in __init__.py