Skip to content Skip to sidebar Skip to footer

Flask And Pycharm Socket.error

I am running Flask in Pycharm. Suddenly I can no longer run the framework properly! I get a bunch of error messages that ends with: socket.error: [Errno 48] Address already in use

Solution 1:

If you're running Linux, do a ps aux | grep python and kill the process that is running flask. If you're running windows, open task manager and kill the python process running flask, but you might have to kill PyCharm.

Solution 2:

You can also click the red square button to stop the run (or command-F2 on a mac). If it fails to stop, you'll get a skull icon to kill the process.

Solution 3:

This happened to me a few times. I eventually found it to be as simple as to just Run > Stop 'server' in PyCharm.

Solution 4:

You want to actively stop the process running your Flask application. Pycharm documentation describes this. Essentially, Pycharm will run applications internally and keep them running for you, so you can do testing or other tasks. Notably, each debugging run will start it's own process - so shutting these down will release resources.

Post a Comment for "Flask And Pycharm Socket.error"