Discussion:
[Matplotlib-users] Event errors in qt5 backend after recent commit
Jorge Scandaliaris
2015-02-18 22:02:41 UTC
Permalink
Hi,
A recent commit against lib/matplotlib/backends/backend_qt5.py [1] causes
some errors in code that was working fine before. The error is as follows:

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in enterEvent(self, event)
249
250 def enterEvent(self, event):
--> 251 FigureCanvasBase.enter_notify_event(self, event, guiEvent=event)
252
253 def leaveEvent(self, event):

TypeError: enter_notify_event() got multiple values for argument 'guiEvent'

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in leaveEvent(self, event)
253 def leaveEvent(self, event):
254 QtWidgets.QApplication.restoreOverrideCursor()
--> 255 FigureCanvasBase.leave_notify_event(self, event, guiEvent=event)
256
257 def mousePressEvent(self, event):

TypeError: leave_notify_event() got multiple values for argument 'guiEvent'



Reverting the changes introduced by the commit in lines 251 and 255 of
backend_qt5.py seems to fix the issue, in my particular use case.

Regards,

Jorge


1.
b72e0cd9e63f7cf4bec2908143c62c23666b674a
Author: Steven Silvester <***@ieee.org>
Date: Sun Feb 15 09:38:21 2015 -0600

Add guiEvent data to Qt backend
Thomas Caswell
2015-02-18 22:32:57 UTC
Permalink
Can you put in a pull request with those changes please?
Post by Jorge Scandaliaris
Hi,
A recent commit against lib/matplotlib/backends/backend_qt5.py [1] causes
------------------------------------------------------------
---------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in enterEvent(self, event)
249
--> 251 FigureCanvasBase.enter_notify_event(self, event, guiEvent=event)
252
TypeError: enter_notify_event() got multiple values for argument 'guiEvent'
------------------------------------------------------------
---------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in leaveEvent(self, event)
254 QtWidgets.QApplication.restoreOverrideCursor()
--> 255 FigureCanvasBase.leave_notify_event(self, event, guiEvent=event)
256
TypeError: leave_notify_event() got multiple values for argument 'guiEvent'
Reverting the changes introduced by the commit in lines 251 and 255 of
backend_qt5.py seems to fix the issue, in my particular use case.
Regards,
Jorge
1.
b72e0cd9e63f7cf4bec2908143c62c23666b674a
Date: Sun Feb 15 09:38:21 2015 -0600
Add guiEvent data to Qt backend
------------------------------------------------------------
------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&
iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Thomas Caswell
2015-02-19 03:05:20 UTC
Permalink
Jorge,

I have put in a PR to fix this issue. Can you confirm that it is
equivalent to your fix? For aesthetic reasons I chose to pass guiEvent as
a kwarg to all of the event related functions.

https://github.com/matplotlib/matplotlib/pull/4130

Tom
Post by Thomas Caswell
Can you put in a pull request with those changes please?
Post by Jorge Scandaliaris
Hi,
A recent commit against lib/matplotlib/backends/backend_qt5.py [1] causes
------------------------------------------------------------
---------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in enterEvent(self, event)
249
--> 251 FigureCanvasBase.enter_notify_event(self, event, guiEvent=event)
252
TypeError: enter_notify_event() got multiple values for argument 'guiEvent'
------------------------------------------------------------
---------------
TypeError Traceback (most recent call last)
/home/jscandal/sw/matplotlib/matplotlib.py3/lib/matplotlib/backends
/backend_qt5.py
in leaveEvent(self, event)
254 QtWidgets.QApplication.restoreOverrideCursor()
--> 255 FigureCanvasBase.leave_notify_event(self, event, guiEvent=event)
256
TypeError: leave_notify_event() got multiple values for argument 'guiEvent'
Reverting the changes introduced by the commit in lines 251 and 255 of
backend_qt5.py seems to fix the issue, in my particular use case.
Regards,
Jorge
1.
b72e0cd9e63f7cf4bec2908143c62c23666b674a
Date: Sun Feb 15 09:38:21 2015 -0600
Add guiEvent data to Qt backend
------------------------------------------------------------
------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/
4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jorge Scandaliaris
2015-02-19 20:38:43 UTC
Permalink
Jorge,I have put in a PR to fix this issue.  Can you confirm that it is
equivalent to your fix?  For aesthetic reasons I chose to pass guiEvent as a
kwarg to all of the event related functions.
https://github.com/matplotlib/matplotlib/pull/4130
Tom
I can confirm this fixes the issue I had.

Jorge

Loading...