[IPython-User] reload bug in 0.13.2?

K.-Michael Aye kmichael.aye@gmail....
Mon Apr 15 17:53:25 CDT 2013


On 2013-04-15 19:16:50 +0000, Paul Ivanov said:

> K.-Michael Aye, on 2013-04-15 11:32,  wrote:
>> On 2013-04-15 18:28:38 +0000, K.-Michael Aye said:
>>> I just experiened this, and I don't have an explanation for it, can it
>>> be a bug?
>>> 
>>> In [50]:
>>> 
>>> import file_utils as fu
>>> In [51]:
>>> 
>>> reload(fu)
>>> ---------------------------------------------------------------------------
>>> ImportError                               Traceback (most recent call last)
>>> <ipython-input-51-53bc81f0bb4a> in <module>()
>>> ----> 1 reload(fu)
>>> 
>>> ImportError: No module named file_utils
>>> 
>> 
>> Additional info: I just tried it in a 'naked' ipython console, works
>> there. so this bug only 'lives' in a notebook, if it is a bug.
> 
> Strange - I can't reproduce this locally (at least not with the
> modules I've tried).
> 
> Can you send along the file_utils module?
> 
> best,

This might be stemming from a misunderstanding of reload's 
capabilities, because I changed the active folder somewhere.
I was under the impression that reload remembers the path to a module 
that is not in the sys.path but only a local module in a folder.
If it is not a design spec for reload to remember where the module was 
loaded, then this is not a bug but a user error.
Because this error only appears when I change the active folder, sorry 
about the noise.

Michael






More information about the IPython-User mailing list