-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Hello,
I have an app with a root-level app.py that does run(...) if __name__ == "__main__". So far so good.
I recently moved app.py into the app module so it was included in the packaging, but now the development-level run(...) doesn't work if reloader=True.
I am using poetry, so the app is running in a venv, if that matters.
> py -m libsearch.app
Running Bottle app in development mode
Routes registered: [<GET / -> libsearch.views:search_form>, <GET /tailwind.css -> libsearch.views:get_css>, <POST /results -> libsearch.views:search>]
[...]\pypoetry\Cache\virtualenvs\libsearch-vAUISaff-py3.11\Scripts\python.exe: No module named libsearch.__main__; 'libsearch' is a package and cannot be directly executed
If I set reloader=False it works as expected. There are easy workarounds (use the root-level app.py or set reloader=False) but this sure took a long time to debug!
Metadata
Metadata
Assignees
Labels
No labels