烧瓶和pycharm socket.error [英] Flask and Pycharm socket.error

查看:73
本文介绍了烧瓶和pycharm socket.error的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Pycharm中运行Flask.突然我再也无法正常运行框架了!我收到一堆以以下内容结尾的错误消息:

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

似乎Flask正在使用套接字:

It seems like the socket Flask is using:

"http://127.0.0.1:5000/" 

由于上次运行时未正确关闭,因此某种程度上它不再可用.我可能可以重新启动计算机,这可能是一个解决方案,但是如果它经常发生,我不想这样做.如何关闭它?

And it is somehow not available anymore because the last runtime was not shut down properly. I can probably restart my computer and it will probably be a solution, but I don't want to do that if it happens regularly. How do I shut it down?

推荐答案

如果您正在运行Linux,请执行 ps aux |.grep python 并杀死正在运行flask的进程.如果您正在运行Windows,请打开任务管理器并杀死正在运行flask的python进程,但是您可能必须杀死PyCharm.

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.

这篇关于烧瓶和pycharm socket.error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆