I recently upgraded from wxPython 2.6.2.1 to wxPython 2.6.3.2 on my Mac,
running Panther and Python 2.3. Now, I frequently get a popup message that
says "Failed to get clipboard data. (error 22: Invalid argument)".
I've been unable to track down the source of this problem. It often occurs
on a dialog's ShowModal() call, but also occurs when I'm deleting data from
the database with no GUI involvement.
This problem doesn't occur with the same source code on Windows, nor did it
occur on my Mac until I upgraded my wxPython. I have drag-and-drop disabled
on the Mac version of Transana due to problems with QuickTime. (The video
jumps to different windows on any drag-and-drop activity.) The problem
occurs in areas of the program that don't even use the Clipboard. There's
no exception raised, no message in the Console, no traceback, nothing. Just
the popup error message with little hint about what's going wrong. I'm not
trying to get clipboard data. I'm sure an argument's missing, as I haven't
provided any clipboard data.
I'm at a loss. I can't create a simple example, as I have no idea what's
causing it, but it's rendered the Mac version of Transana unusable. And I
need a couple of features of the latest wxPython, especially improved wxSTC
support for non-English characters on the Mac.
Does anyone have any idea where this message might be coming from and what
in my code might be triggering it? It's clearly a Clipboard message, but it
pops up when I'm not doing anything with the Clipboard.
David K. Woods
Transana Lead Developer
Wisconsin Center for Education Research
University of Wisconsin, Madison
http://www.transana.org
Hi David,
I recently upgraded from wxPython 2.6.2.1 to wxPython 2.6.3.2 on my Mac,
running Panther and Python 2.3. Now, I frequently get a popup message that
says "Failed to get clipboard data. (error 22: Invalid argument)".
I've been unable to track down the source of this problem. It often occurs
on a dialog's ShowModal() call, but also occurs when I'm deleting data from
the database with no GUI involvement.
This problem doesn't occur with the same source code on Windows, nor did it
occur on my Mac until I upgraded my wxPython. I have drag-and-drop disabled
on the Mac version of Transana due to problems with QuickTime. (The video
jumps to different windows on any drag-and-drop activity.) The problem
occurs in areas of the program that don't even use the Clipboard. There's
no exception raised, no message in the Console, no traceback, nothing. Just
the popup error message with little hint about what's going wrong. I'm not
trying to get clipboard data. I'm sure an argument's missing, as I haven't
provided any clipboard data.
I'm at a loss. I can't create a simple example, as I have no idea what's
causing it, but it's rendered the Mac version of Transana unusable. And I
need a couple of features of the latest wxPython, especially improved wxSTC
support for non-English characters on the Mac.
Does anyone have any idea where this message might be coming from and what
in my code might be triggering it? It's clearly a Clipboard message, but it
pops up when I'm not doing anything with the Clipboard.
I've seen similar things before. These messages seem to appear when there's an attempt to retrieve data on the clipboard that wxClipboard doesn't understand/parse. It's very surprising, though, that this appears when you are not ever interacting with the clipboard. Are you sure you aren't trying to get data from the clipboard anywhere in the application?
In any case, these messages probably don't affect your app in the least, so what you can do is redirect the (non-fatal) asserts like this to a log by calling wx.Log_SetActiveTarget(mylog). You can create a log class by deriving from wx.PyLog, and implementing the DoLogString(self, message, timeStamp) method to do whatever you want to do with the message in your derived class.
Hope this helps!
Kevin
ยทยทยท
On May 9, 2006, at 7:43 AM, David Woods wrote:
David K. Woods
Transana Lead Developer
Wisconsin Center for Education Research
University of Wisconsin, Madison
http://www.transana.org
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org