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 {
122122 PyObject* cmname = PyString_FromString (" matplotlib.cm" );
123123 PyObject* pylabname = PyString_FromString (" pylab" );
124124 if (!pyplotname || !pylabname || !matplotlibname || !cmname) {
125- throw std::runtime_error (" couldnt create string" );
125+ throw std::runtime_error (" couldnt create string" );
126126 }
127127
128128 PyObject* matplotlib = PyImport_Import (matplotlibname);
129129 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+ }
131134
132135 // matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
133136 // or matplotlib.backends is imported for the first time
You can’t perform that action at this time.
0 commit comments