[Numpy-discussion] Does a C-API mismatch require a fatal(!) program termination !? (crash on import !)

Sebastian Haase haase at msg.ucsf.edu
Fri Aug 11 23:31:20 CDT 2006

I was just wondering if it might be possible to raise an ImportError 
instead of terminating python;
look what I get:
haase at doe:~: python
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on 
Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy
 >>> import sys
 >>> sys.path.append("PrCyg")
 >>> from Priithon import seb
RuntimeError: module compiled against version 1000000 of C-API but this 
of numpy is 1000002
Fatal Python error: numpy.core.multiarray failed to import... exiting.

This application has requested the Runtime to terminate it in an unusual 
Please contact the application's support team for more information.
haase at doe:~:

Assume that you are running an interactive session, analysing some 
important[;-)] data. Then you think: "Oh, I should try this one (maybe 
little old) module on this" ...  so you try to import ... and ... 
suddenly the entire python application crashes.
When your shell application runs without a terminal you don't even get 
to read the error message !

- Sebastian Haase

More information about the Numpy-discussion mailing list