New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoreload can't handle module / __main__ #1411
Comments
My guess is that the autoloading feature is simply not aware of the
I'm pretty sure you can work around the issue by adding |
Didn't see that this had an issue already. See #1436, both issues are caused by the same situation. |
I suspect that the autoreloader functionality has never supported launching as If someone would like to devise a fix, I suspect using the |
Bit tricky to fix because of http://bugs.python.org/issue14208 |
Originally reported by: Anonymous
I try to run
python -m mymodule
(andmymodule/
contains__main__.py
). The module then spawns a CherryPy server. Everything works until it tries to reload itself, where it tries to run/path/to/python mymodule/__main__.py
, without importingmymodule
. This makes my module to throw variousImportError
s that claimmymodule
cannot be found.Could you share any tips how to organize the code, or change the way I run the server, to make reloading work?
The text was updated successfully, but these errors were encountered: