Issue
I have a simple Flask based project in Pycharm. I am trying to debug this by right clicking and selecting debug option. But keeps getting below error:
Connected to pydev debugger (build 232.9559.58)
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://192.168.0.29:8000
Press CTRL+C to quit
* Restarting with stat
C:\Python311\python.exe: can't open file 'C:\\Program': [Errno 2] No such file or directory
Process finished with exit code 2
I am unable to understand why and what it is looking for in 'C:\\Program'
. I am able to run the file perfectly fine and only having issues in debug. What can I try next?
Solution
This appears to be a bug in Pycharm. Multiple issues have been raised for the same in the JetBrains bug tracker.
- FLASK_DEBUG=1 breaks debugger when Python/PyCharm installation path has spaces
- Flask Debug session cannot be started in PyCharm
- Flask debugger is not working on Windows because of white space in installation directory if application is specified
- flask server run failed because of space character in file path
- Can not run flask project in debug mod
You can follow this comment(or this comment) to get a temporary workaround.
Answered By - Abdul Niyas P M
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.