Skip to content
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

Auto reloading not works in PyCharm #48

Closed
Bobsans opened this issue Feb 25, 2019 · 8 comments
Closed

Auto reloading not works in PyCharm #48

Bobsans opened this issue Feb 25, 2019 · 8 comments

Comments

@Bobsans
Copy link
Contributor

Bobsans commented Feb 25, 2019

When I create a startup configuration and start the server with it, after changing the code, the server stops and does not start again.

@pgjones
Copy link
Member

pgjones commented Feb 25, 2019

I haven't used PyCharm so I'm not sure how it runs Quart, could you provide the command it uses to invoke Quart?

Also can you check you have Hypercorn >= 0.5.3 installed? 0.5.3 fixed a number of reloader issues.

@Bobsans
Copy link
Contributor Author

Bobsans commented Feb 25, 2019

I tried many ways to run it.

By default PyCharm may runs main.py as file or as module.
If run as file command looks like this:
C:\py37-env\Scripts\python.exe D:/Python/quart-test/main.py
run as module like this:
C:\py37-env\Scripts\python.exe -m main
In both cases auto reloading not works.

I tried run app with Hypercorn too.
Command in PyCharm looks like this:
C:\py37-env\Scripts\python.exe -m hypercorn main:app
and auto reload still not works.

Even else run Hypercorn from PyCharm terminal (> hypercorn main:app) i got same result.

Maybe problem in PyCharm. I not sure.

@Bobsans
Copy link
Contributor Author

Bobsans commented Feb 25, 2019

Output from terminal:

(py37-env) D:\Python\quart-test> hypercorn main:app
- Running on 127.0.0.1:8000 over http (CTRL + C to quit)
- Running on http://localhost:5000 (CTRL + C to quit)

(i change code)

(py37-env) D:\Python\quart-test> c:\py37-env\scripts\python.exe: can't open file 'main:app': [Errno 2] No such file or directory

@pgjones
Copy link
Member

pgjones commented Feb 25, 2019

Could you confirm which version of Hypercorn you are using?

@Bobsans
Copy link
Contributor Author

Bobsans commented Feb 25, 2019

Hypercorn 0.5.3

@tjtaill
Copy link

tjtaill commented Mar 9, 2019

I use nodemon https://nodemon.io/ to restart quart / hypercorn when I develop works pretty well, yes it is a nodejs tool but surprisingly works well with python too

@pgjones
Copy link
Member

pgjones commented Mar 16, 2019

I think this is fixed in master with bb6989da48080478a87d4e909b3da00fe6fe6ca4 and the 0.5-maintenance branch in a4919a853e4b9b921d5132a79cf65e343432f8fe. Could you try it? If it works I'll release 0.5.4.

@pgjones pgjones closed this as completed Mar 23, 2019
@slyduda
Copy link

slyduda commented Oct 8, 2019

Hot reloading is not working for me due to a space in my path name when trying to access my conda environment.

C:\Users\Sylvester: can't open file 'Duda\.conda\envs\onyx\python.exe': [Errno 2] No such file or directory

This works fine in vanilla Flask though.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants