Python - 找不到记录器“OpenGL.error”的处理程序
好吧,这是什么,为什么在Win2003服务器上会出现,而在WinXP上却不会。
它似乎根本不影响我的应用程序,但当我关闭应用程序时,我收到此错误消息。 这很烦人(错误消息应该如此)。
我正在使用 pyOpenGl 和 wxPython 来做图形工作。 不幸的是,我是一名 C# 程序员,接管了这个 Python 应用程序,我必须学习 Python 才能做到这一点。
我可以提供代码和版本号等,但我仍在学习技术内容,因此任何帮助将不胜感激。
Python 2.5、wxPython 和 pyOpenGL
Okay, what is it, and why does it occur on Win2003 server, but not on WinXP.
It doesn't seem to affect my application at all, but I get this error message when I close the application. And it's annoying (as errors messages should be).
I am using pyOpenGl and wxPython to do the graphics stuff. Unfortunately, I'm a C# programmer that has taken over this Python app, and I had to learn Python to do it.
I can supply code and version numbers etc, but I'm still learning the technical stuff, so any help would be appreciated.
Python 2.5, wxPython and pyOpenGL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来 OpenGL 正在尝试在 Win2003 上报告一些错误,但是您还没有配置系统输出日志信息的位置。
您可以将以下内容添加到程序的开头,您将在 stderr 中看到错误的详细信息。
查看 logging 模块的文档以获取更多配置信息,从概念上讲,它类似于 log4J。
Looks like OpenGL is trying to report some error on Win2003, however you've not configured your system where to output logging info.
You can add the following to the beginning of your program and you'll see details of the error in stderr.
Checkout documentation on logging module to get more config info, conceptually it's similar to log4J.
摆脱此消息的正确方法是配置NullHandler 用于库 (OpenGL) 的根级别记录器。
The proper way to get rid of this message is to configure NullHandler for the root level logger of your library (OpenGL).
添加上面的日志记录后,我发现问题是由缺少 TConstants 类引起的,我在 py2exe setup.py 文件中排除了该类。
从排除列表中删除“Tconstants”后,我不再遇到问题。
After adding the Logging above, I was able to see that the problem was caused by missing TConstants class, which I was excluding in the py2exe setup.py file.
After removing the "Tconstants" from the excluded list, I no longer had problems.