How to disable "Warning: 510 source ID was not found when trying to delete it - GLib.source_remove (self._idle_event_id)"?

When i do

#!/usr/bin/env python import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4]) plt.show() 

(and more complex examples) I get

 /usr/local/lib/python3.4/dist-packages/ matplotlib/backends/backend_gtk3.py:215: Warning: Source ID 7 was not found when attempting to remove it GLib.source_remove(self._idle_event_id) 

What causes this and how can I get rid of these warnings?

I know I can use

 import warnings warnings.simplefilter("ignore") 

to get rid of all the warnings, but that’s not what I am asking for. I want to have warnings, but none of matplotlib (especially the one on top).

+6
source share
1 answer

GLib.source_remove not successful because self.close_event() , which was executed earlier, probably already completed the task.

This commit should fix your problem. This is from February 23rd. You can either wait for the next version, or apply the fix manually.

+8
source

Source: https://habr.com/ru/post/984899/


All Articles