Search code examples
pythonmayavi

Every MayaVi exception hangs my ipython interpreter


Whenever I trigger an error in MayaVi, such as calling mlab.outline() when there is no plot figure, I get

No handlers could be found for logger "mayavi.core.common"

and my ipython interpreter becomes totally unresponsive, even to Ctrl-D or Ctrl-C; I have no choice but to kill the parent process.

If you do something similar in matplotlib, you'll get an Exception of some sort that is usually pretty descriptive and you're allowed to continue using your interpreter.

I've had this behavior when I launch with ipython --gui=wx and also with --gui=qt.

Am I doing something wrong, or is MayaVi just awful at error handling?


Solution

  • The library you are using is trying to make a call to Python's logging module but your application apparently isn't making use of logging.

    See more here:https://docs.python.org/3.1/library/logging.html#configuring-logging-for-a-library