diff --git a/PythonInterpreter/PythonInterpreter.cc b/PythonInterpreter/PythonInterpreter.cc
index cb630f834fd4e50f2b95cf9290a10d629b202ab2..7292e5448000d4cd9c81455fad8bea1bde961cd2 100644
--- a/PythonInterpreter/PythonInterpreter.cc
+++ b/PythonInterpreter/PythonInterpreter.cc
@@ -192,8 +192,16 @@ void PythonInterpreter::initPython() {
         std::cerr << "Importing "+ pythonPlugins[i].toStdString() + " module ...";
       #endif
 
-      py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
-      main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
+      //try catching an error here for debugging purposes
+      try{
+        py::module om_module(py::module::import(pythonPlugins[i].toStdString().c_str()));
+        main_namespace[pythonPlugins[i].toStdString().c_str()] = om_module;
+      }
+      catch (py::error_already_set &e)
+      {
+        pyError(e.what());
+        return;
+      }
 
       #ifdef PYTHON_DEBUG
         std::cerr << " Done" << std::endl;