4

I am trying to embed a matplotlib canvas into a PySide2 application. I have tried to use this example: https://matplotlib.org/examples/user_interfaces/embedding_in_qt5.html

The example runs fine using PyQt5. However, if I change line 19 from

from PyQt5 import QtCore, QtWidgets

into

from PySide2 import QtCore, QtWidgets

then Python crashes with the message

Fatal Python error: deallocating None

as soon as the application window is closed. Is there any way to get this working properly using PySide2?

user1919235
  • 470
  • 7
  • 17

1 Answers1

1

It turns out that this was a bug in PySide2, which now has been fixed (see https://bugreports.qt.io/browse/PYSIDE-632?gerritReviewStatus=All). Just update to the most current version to get rid of the problem.

user1919235
  • 470
  • 7
  • 17