weditor报错wself.wrapped.flush() AttributeError: ‘MockStdout‘ object has no attribute ‘flush‘解决方法

报错情况
weditor报错wself.wrapped.flush() AttributeError: ‘MockStdout‘ object has no attribute ‘flush‘解决方法_第1张图片
Set environment and prepare d = u2.connect()Traceback (most recent call last):
File “”, line 1, in
File “C:\python_dm\test\venv\lib\site-packages\colorama\ansitowin32.py”, line 47, in write
self.__convertor.write(text)
File “C:\python_dm\test\venv\lib\site-packages\colorama\ansitowin32.py”, line 177, in write
self.write_and_convert(text)
File “C:\python_dm\test\venv\lib\site-packages\colorama\ansitowin32.py”, line 205, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File “C:\python_dm\test\venv\lib\site-packages\colorama\ansitowin32.py”, line 211, in write_plain_text
self.wrapped.flush()
AttributeError: ‘MockStdout’ object has no attribute ‘flush’[Finished 0.003s]

解决办法
修改ipyshell-console.py文件,这个文件路径就在报错信息里面
weditor报错wself.wrapped.flush() AttributeError: ‘MockStdout‘ object has no attribute ‘flush‘解决方法_第2张图片

weditor报错wself.wrapped.flush() AttributeError: ‘MockStdout‘ object has no attribute ‘flush‘解决方法_第3张图片
weditor报错wself.wrapped.flush() AttributeError: ‘MockStdout‘ object has no attribute ‘flush‘解决方法_第4张图片
然后就解决了

原文地址https://github.com/alibaba/web-editor/issues/131

你可能感兴趣的:(python)