File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,15 @@ struct _interpreter {
121
121
PyObject* cmname = PyString_FromString (" matplotlib.cm" );
122
122
PyObject* pylabname = PyString_FromString (" pylab" );
123
123
if (!pyplotname || !pylabname || !matplotlibname || !cmname) {
124
- throw std::runtime_error (" couldnt create string" );
124
+ throw std::runtime_error (" couldnt create string" );
125
125
}
126
126
127
127
PyObject* matplotlib = PyImport_Import (matplotlibname);
128
128
Py_DECREF (matplotlibname);
129
- if (!matplotlib) { throw std::runtime_error (" Error loading module matplotlib!" ); }
129
+ if (!matplotlib) {
130
+ PyErr_Print ();
131
+ throw std::runtime_error (" Error loading module matplotlib!" );
132
+ }
130
133
131
134
// matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
132
135
// or matplotlib.backends is imported for the first time
You can’t perform that action at this time.
0 commit comments