[IPython-user] Error when importing module into ipython
Tue Apr 3 00:35:57 CDT 2007
On 4/2/07, John Pye <email@example.com> wrote:
> Hi all
> I have a python module that I've developed. It's C++ code wrapped with
> SWIG to provide steam properties for use in engineering calculations.
> But I've just noticed that it won't import correctly under IPython 0.7.3
> on Python 2.4.2 on Windows XP. I get an error message like shown below.
> The funny thing is that I can import the package fine under the standard
> vanilla python console, and there are no errors (even when I run type
> 'S = freesteam.steam_pT(); del S', which the following would suggest
> could have failed). And it imports fine under IPython 0.7.2 on Linux
> as well.
> Any suggestions on what I could be doing wrong here?
No idea, it looks very very strange. A few things you can do:
- type %xmode verbose. This will give you more verbose tracebacks,
with information on the failing modules. That might give you a clue.
- After the error, type %debug. This will drop you into the
interactive debugger right where the crash occurred. You can try then
looking at the _freesteam object to study it and see if it looks OK.
You might be picking one from the wrong directory, I don't know.
More information about the IPython-user