python 打包后报错:

'NoneType' object has no attribute 'write'

解决:

if sys.stdout is None:
    sys.stdout = open(os.devnull, "w")
if sys.stderr is None:
    sys.stderr = open(os.devnull, "w")
最后修改于:2024-02-01 01:32
文章链接: https://oct.cn/view/181
版权声明: 本站所有文章除特别声明外。转载请注明来自 十月笔记