echoing-nightfall-72095
01/13/2021, 11:39 AMapps
and for now a single app in a subdirectory sample
in this a app.py
When executing ./pants run apps/sample/app.py
pants. build as expected but,
I'm not able to run flask in debug mode.
if __name__ == "__main__":
app.run(host='localhost', port=7002, debug=True)
Then, I get the following error message:
No module named apps.__main__; 'apps' is a package and cannot be directly executed
It runs without errors when:
if __name__ == "__main__":
app.run(host='localhost', port=7002)
I've tried googling for this issue, but with no luck. Hence now reaching out. It would be nice not having to ctr-c
and re-run whenever changes are made to the app when developing.
Hope to hear from you!
BR Alexhundreds-father-404
01/13/2021, 4:44 PMdebug=True, use_reloader=False
to still get debug benefits, but you unfortunately wouldn't get the rewatcher
Would you have an interest in trying out #1172? We're happy to help, it'd be the quickest way to get the fix in sooner
Also let us know if we can help with anything else with Pants or if you have feedback!witty-crayon-22786
01/13/2021, 5:07 PMenough-analyst-54434
01/13/2021, 8:05 PM--unzip
) was not in fact a workaround, but using --venv
is a workaround. That's on master and ships in the upcomping Pex 2.1.25 release. So Pants will have support soon.echoing-nightfall-72095
01/14/2021, 10:48 AMenough-analyst-54434
01/14/2021, 12:11 PM