sfepy/sfepy — Issue #165: Catch only ImportError where sufficient
Author: rc
Created: 2012-01-30 10:27:49+00:00
State: open

In sfepy/postprocess/viewer.py, it should be:

try:
from enthought.traits.api \
import HasTraits, Instance, Button, Int, Bool, on_trait_change
...
except ImportError:
...

Alternatively, add some further exception classes. But currently, all exceptions are caught. This can lead to misguiding tracebacks. In my case, no X terminal was found, yet the interpreter reported an import error (with one of the modules after the "except").

Migrated from http://code.google.com/p/sfepy/issues/detail?id=163

earlier comments

torsten.bronger said, at 2011-12-22T04:31:47.000Z:

It must be "no X server" of cause.

robert.cimrman said, at 2011-12-22T11:23:41.000Z:

This try: clause is a workaround for incompatibility between mayavi 4.0.0 and 3.x.x. I have 4.0.0. and catching just ImportError works for me, so it's in. Thanks!