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 @@ -122,12 +122,15 @@ struct _interpreter {
122
122
PyObject* cmname = PyString_FromString (" matplotlib.cm" );
123
123
PyObject* pylabname = PyString_FromString (" pylab" );
124
124
if (!pyplotname || !pylabname || !matplotlibname || !cmname) {
125
- throw std::runtime_error (" couldnt create string" );
125
+ throw std::runtime_error (" couldnt create string" );
126
126
}
127
127
128
6E5B
128
PyObject* matplotlib = PyImport_Import (matplotlibname);
129
129
Py_DECREF (matplotlibname);
130
- if (!matplotlib) { throw std::runtime_error (" Error loading module matplotlib!" ); }
130
+ if (!matplotlib) {
131
+ PyErr_Print ();
132
+ throw std::runtime_error (" Error loading module matplotlib!" );
133
+ }
131
134
132
135
// matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
133
136
// or matplotlib.backends is imported for the first time
You can’t perform that action at this time.
0 commit comments