微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

wxPython wx.NotificationMessage 'BadImplementation服务器没有实现操作'

如何解决wxPython wx.NotificationMessage 'BadImplementation服务器没有实现操作'

这是一个奇怪的 - 我只是想在 Fedora 32 上拼凑一个简单的 wxpython TaskBarIcon,但它抛出了段错误和 BadImplementation 错误。我见过一些类似的线程,但没有一个以修复我的原位的方式解决。这是发行版中的 Xorg/Wayland 包装错误还是我遗漏了一些基本的东西?

msg=NotificationMessage('test','test')
msg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)

这个简单的代码在原本非常健康的 TaskBarIcon 应用程序中会产生 SIGSEGV 或以下崩溃:

(livewebcam.py:906900): Gdk-ERROR **: 17:05:27.719: The program 'test.py' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadImplementation (server does not implement operation)'.
  (Details: serial 838 error_code 17 request_code 20 (core protocol) minor_code 0)
  (Note to programmers: normally,X errors are reported asynchronously;
   that is,you will receive the error a while after causing it.
   To debug your program,run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

已安装的版本如下。 KDE 在 Xorg(不是 Wayland)上旋转。

Installed Packages
Name         : xorg-x11-server-Xorg
Version      : 1.20.10
Release      : 1.fc32
Architecture : x86_64
Size         : 3.8 M
Source       : xorg-x11-server-1.20.10-1.fc32.src.rpm

python-wxpython4-doc.noarch                        4.0.7-5.fc32  
python3-wxpython4.x86_64                           4.0.7-5.fc32    
python3-wxpython4-media.x86_64                     4.0.7-5.fc32    
python3-wxpython4-webview.x86_64                   4.0.7-5.fc32
wxBase3.x86_64                                     3.0.4-13.fc32

感谢任何见解 - 这不是我的一周。

解决方法

放弃,因为实施似乎被放弃了。 Notify2 可以很简单地完成工作。感谢萨克森的@rolf。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。