pombreda / sfepy

Automatically exported from code.google.com/p/sfepy
0 stars 0 forks source link

Catch only ImportError where sufficient #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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").

Original issue reported on code.google.com by torsten....@gmail.com on 22 Dec 2011 at 4:31

GoogleCodeExporter commented 9 years ago
It must be "no X server" of cause.

Original comment by torsten....@gmail.com on 22 Dec 2011 at 4:31

GoogleCodeExporter commented 9 years ago
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!

Original comment by robert.c...@gmail.com on 22 Dec 2011 at 11:23

GoogleCodeExporter commented 9 years ago
Migrated to http://github.com/sfepy/sfepy/issues/165

Original comment by robert.c...@gmail.com on 30 Jan 2012 at 10:27