pycharm debugger 错误 lost sys.stdout /Connection to Python debugger failed Socket closed

错误描述

Connection to Python debugger failed Socket closed

Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/io.py", line 52, in 
  File "/Users/lihao/Desktop/code/TCP/day2 shiyan/abc.py", line 1, in 
RuntimeError: lost sys.stdout

解决方案

在 stackoverflower 找到解决方案: https://stackoverflow.com/questions/45122480/pycharm-runtimeerror-lost-sys-stdout-how-to-fix-this

abc.py 是io调用的一个模块,debugger时不能识别到底是哪一个模块,所以以后对于这些模块文件起名字应该注意一下。

你可能感兴趣的:(问题解决)