-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用-w方式打包会报错 #194
Comments
|
问题出在UIFunc.py的41行 logger.add(sys.stdout, backtrace=True, diagnose=True, level='DEBUG') 该行是给DEBUG调试logger添加一个handler,但是输出的目标是stdout。 而使用-w打包的时候纯GUI程序的sys.stdout是None,所以出现了该错误,在打包GUI程序的时候可以将该行注释掉,或者通用一点的做法这句话修改为 if sys.stdout is not None:
logger.add(sys.stdout, backtrace=True, diagnose=True, level='DEBUG') 在不为None的时候再添加handler |
@bingfengfeifei 多谢 学习了 问题解决 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最后我尝试使用传统的-c打包方式可以运行
The text was updated successfully, but these errors were encountered: