I'm using PySide2 and matplotlib. When plt.subplots is executed, this error is raised and the application is terminated.
I'm currently using matplotlib.use('Qt5Agg'), but does not make any difference.
I'm using Anaconda with Python 3.6.5.
Any hint?
EDIT: Added minimal example
def plot():
import pandas as pd
import matplotlib
matplotlib.use('Qt5Agg')
#matplotlib.rcParams['backend.qt5']='PySide2'
import matplotlib.pyplot as plt
fig, (ax, ax1) = plt.subplots(2, 1, sharex=True)
if __name__ == '__main__':
import sys
from PySide2.QtWidgets import QApplication
from ib_insync import util
util.useQt()
app = QApplication(sys.argv)
plot()