Ticket #141 (defect)

Opened 1 year ago

Last modified 1 year ago

X Error on try: pynotify from inside a class

Status: new

Reported by: RainCT Assigned to: chipx86
Priority: normal Milestone:
Component: notify-python Version:
Severity: major Keywords:
Cc: rainct@ubuntuwire.com D-BUS Version:
Patch Included: 0 OS/Distro Version:

I've been trying to do something like this from inside a class:

try:

import pynotify except Import Error: print "No..." else: print "Yes!"

But I got this error message whenever the class was executed:

The program 'qttube.py' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch? (invalid parameter attributes)'.

(Details: serial 5089 error_code 8 request_code 42 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 --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

I've been trying and found that the problem was exactly the "import pynotify". Changing it to, for example, "import sys" worked perfectly. Finally I noticed that if I put the import on the top of the file then it didn't complain anymore...

I think you should have a look at it. On my case it isn't really problematic, since I can live by having the import on the top, but anyway I've been trying like 15 minutes to discover this...

Change History

07/09/07 12:22:08: Modified by RainCT

  • cc set to rainct@ubuntuwire.com.