Created
April 18, 2012 13:43
-
-
Save takluyver/2413637 to your computer and use it in GitHub Desktop.
IPython.lib.deepreload traceback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [12]: dreload(B, exclude=['A']) | |
Reloading io | |
Reloading _io | |
Reloading os | |
Reloading sys | |
Reloading errno | |
Reloading posix | |
Reloading posixpath | |
Reloading stat | |
Reloading genericpath | |
Reloading os.path | |
--------------------------------------------------------------------------- | |
ImportError Traceback (most recent call last) | |
/home/thomas/Code/virtualenvs/ipy-2to3/<ipython-input-12-860124aea0b4> in <module>() | |
----> 1 dreload(B, exclude=['A']) | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in reload(module=<module 'B' from 'B.py'>, exclude=['A']) | |
310 builtins.__import__ = deep_import_hook | |
311 try: | |
--> 312 ret = deep_reload_hook(module) | |
ret = undefined | |
global deep_reload_hook = <function deep_reload_hook at 0x991af6c> | |
module = <module 'B' from 'B.py'> | |
313 finally: | |
314 builtins.__import__ = original_import | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in deep_reload_hook(m=<module 'B' from 'B.py'>) | |
274 | |
275 try: | |
--> 276 fp, filename, stuff = imp.find_module(subname, path) | |
fp = undefined | |
filename = undefined | |
stuff = undefined | |
global imp.find_module = <built-in function find_module> | |
subname = 'B' | |
path = None | |
277 finally: | |
278 modules_reloading.clear() | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in deep_import_hook(name='io', globals={'ModuleType': <class 'module'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'EnvironmentError'>, ...}, '__cached__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...IPython/lib/__pycache__/deepreload.cpython-32.pyc', '__doc__': '\nA module to change reload() so that it acts rec...re-implementation of hierarchical module import.\n', '__file__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...thon-0.13.dev-py3.2.egg/IPython/lib/deepreload.py', '__name__': 'IPython.lib.deepreload', '__package__': None, 'add_submodule': <function add_submodule>, 'builtins': <module 'builtins' (built-in)>, 'deep_import_hook': <function deep_import_hook>, ...}, locals={'ModuleType': <class 'module'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'EnvironmentError'>, ...}, '__cached__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...IPython/lib/__pycache__/deepreload.cpython-32.pyc', '__doc__': '\nA module to change reload() so that it acts rec...re-implementation of hierarchical module import.\n', '__file__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...thon-0.13.dev-py3.2.egg/IPython/lib/deepreload.py', '__name__': 'IPython.lib.deepreload', '__package__': None, 'add_submodule': <function add_submodule>, 'builtins': <module 'builtins' (built-in)>, 'deep_import_hook': <function deep_import_hook>, ...}, fromlist=[], level=0) | |
224 parent, buf = get_parent(globals, level) | |
225 | |
--> 226 head, name, buf = load_next(parent, None if level < 0 else parent, name, buf) | |
head = undefined | |
name = 'io' | |
buf = '' | |
global load_next = <function load_next at 0x991ae2c> | |
parent = None | |
level = 0 | |
227 | |
228 tail = head | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in load_next(mod=None, altmod=None, name='io', buf='io') | |
132 buf += subname | |
133 | |
--> 134 result = import_submodule(mod, subname, buf) | |
result = undefined | |
global import_submodule = <function import_submodule at 0x991ae6c> | |
mod = None | |
subname = 'io' | |
buf = 'io' | |
135 if result is None and mod != altmod: | |
136 result = import_submodule(altmod, subname, subname) | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in import_submodule(mod=None, subname='io', fullname='io') | |
173 | |
174 try: | |
--> 175 m = imp.load_module(fullname, fp, filename, stuff) | |
m = undefined | |
global imp.load_module = <built-in function load_module> | |
fullname = 'io' | |
fp = <_io.TextIOWrapper name=7 mode='U' encoding='utf-8'> | |
filename = '/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/io.py' | |
stuff = ('.py', 'U', 1) | |
176 except: | |
177 # load_module probably removed name from modules because of | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/io.py in <module>() | |
58 | |
59 | |
---> 60 import _io | |
global _io = <module 'io' (built-in)> | |
61 import abc | |
62 | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in deep_import_hook(name='_io', globals={'BlockingIOError': <class 'BlockingIOError'>, 'BufferedIOBase': <class 'io.BufferedIOBase'>, 'BufferedRWPair': <class '_io.BufferedRWPair'>, 'BufferedRandom': <class '_io.BufferedRandom'>, 'BufferedReader': <class '_io.BufferedReader'>, 'BufferedWriter': <class '_io.BufferedWriter'>, 'BytesIO': <class '_io.BytesIO'>, 'DEFAULT_BUFFER_SIZE': 8192, 'FileIO': <class '_io.FileIO'>, 'IOBase': <class 'io.IOBase'>, ...}, locals={'BlockingIOError': <class 'BlockingIOError'>, 'BufferedIOBase': <class 'io.BufferedIOBase'>, 'BufferedRWPair': <class '_io.BufferedRWPair'>, 'BufferedRandom': <class '_io.BufferedRandom'>, 'BufferedReader': <class '_io.BufferedReader'>, 'BufferedWriter': <class '_io.BufferedWriter'>, 'BytesIO': <class '_io.BytesIO'>, 'DEFAULT_BUFFER_SIZE': 8192, 'FileIO': <class '_io.FileIO'>, 'IOBase': <class 'io.IOBase'>, ...}, fromlist=None, level=0) | |
224 parent, buf = get_parent(globals, level) | |
225 | |
--> 226 head, name, buf = load_next(parent, None if level < 0 else parent, name, buf) | |
head = undefined | |
name = '_io' | |
buf = '' | |
global load_next = <function load_next at 0x991ae2c> | |
parent = None | |
level = 0 | |
227 | |
228 tail = head | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in load_next(mod=None, altmod=None, name='_io', buf='_io') | |
132 buf += subname | |
133 | |
--> 134 result = import_submodule(mod, subname, buf) | |
result = undefined | |
global import_submodule = <function import_submodule at 0x991ae6c> | |
mod = None | |
subname = '_io' | |
buf = '_io' | |
135 if result is None and mod != altmod: | |
136 result = import_submodule(altmod, subname, subname) | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in import_submodule(mod=None, subname='_io', fullname='_io') | |
173 | |
174 try: | |
--> 175 m = imp.load_module(fullname, fp, filename, stuff) | |
m = undefined | |
global imp.load_module = <built-in function load_module> | |
fullname = '_io' | |
fp = None | |
filename = '_io' | |
stuff = ('', '', 6) | |
176 except: | |
177 # load_module probably removed name from modules because of | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in deep_import_hook(name='os', globals={'ModuleType': <class 'module'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'EnvironmentError'>, ...}, '__cached__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...IPython/lib/__pycache__/deepreload.cpython-32.pyc', '__doc__': '\nA module to change reload() so that it acts rec...re-implementation of hierarchical module import.\n', '__file__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...thon-0.13.dev-py3.2.egg/IPython/lib/deepreload.py', '__name__': 'IPython.lib.deepreload', '__package__': None, 'add_submodule': <function add_submodule>, 'builtins': <module 'builtins' (built-in)>, 'deep_import_hook': <function deep_import_hook>, ...}, locals={'ModuleType': <class 'module'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class 'EnvironmentError'>, ...}, '__cached__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...IPython/lib/__pycache__/deepreload.cpython-32.pyc', '__doc__': '\nA module to change reload() so that it acts rec...re-implementation of hierarchical module import.\n', '__file__': '/home/thomas/Code/virtualenvs/ipy-2to3/lib/pytho...thon-0.13.dev-py3.2.egg/IPython/lib/deepreload.py', '__name__': 'IPython.lib.deepreload', '__package__': None, 'add_submodule': <function add_submodule>, 'builtins': <module 'builtins' (built-in)>, 'deep_import_hook': <function deep_import_hook>, ...}, fromlist=[], level=0) | |
224 parent, buf = get_parent(globals, level) | |
225 | |
--> 226 head, name, buf = load_next(parent, None if level < 0 else parent, name, buf) | |
head = undefined | |
name = 'os' | |
buf = '' | |
global load_next = <function load_next at 0x991ae2c> | |
parent = None | |
level = 0 | |
227 | |
228 tail = head | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in load_next(mod=None, altmod=None, name='os', buf='os') | |
132 buf += subname | |
133 | |
--> 134 result = import_submodule(mod, subname, buf) | |
result = undefined | |
global import_submodule = <function import_submodule at 0x991ae6c> | |
mod = None | |
subname = 'os' | |
buf = 'os' | |
135 if result is None and mod != altmod: | |
136 result = import_submodule(altmod, subname, subname) | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in import_submodule(mod=None, subname='os', fullname='os') | |
173 | |
174 try: | |
--> 175 m = imp.load_module(fullname, fp, filename, stuff) | |
m = undefined | |
global imp.load_module = <built-in function load_module> | |
fullname = 'os' | |
fp = <_io.TextIOWrapper name=11 mode='U' encoding='utf-8'> | |
filename = '/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/os.py' | |
stuff = ('.py', 'U', 1) | |
176 except: | |
177 # load_module probably removed name from modules because of | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/os.py in <module>() | |
104 | |
105 sys.modules['os.path'] = path | |
--> 106 from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep, | |
global os.path = undefined | |
global curdir = '.' | |
global pardir = '..' | |
global sep = '/' | |
global pathsep = ':' | |
global defpath = ':/bin:/usr/bin' | |
global extsep = '.' | |
global altsep = None | |
global devnull = '/dev/null' | |
107 devnull) | |
108 | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in deep_import_hook(name='path', globals={'EX_CANTCREAT': 73, 'EX_CONFIG': 78, 'EX_DATAERR': 65, 'EX_IOERR': 74, 'EX_NOHOST': 68, 'EX_NOINPUT': 66, 'EX_NOPERM': 77, 'EX_NOUSER': 67, 'EX_OK': 0, 'EX_OSERR': 71, ...}, locals={'EX_CANTCREAT': 73, 'EX_CONFIG': 78, 'EX_DATAERR': 65, 'EX_IOERR': 74, 'EX_NOHOST': 68, 'EX_NOINPUT': 66, 'EX_NOPERM': 77, 'EX_NOUSER': 67, 'EX_OK': 0, 'EX_OSERR': 71, ...}, fromlist=('curdir', 'pardir', 'sep', 'pathsep', 'defpath', 'extsep', 'altsep', 'devnull'), level=0) | |
228 tail = head | |
229 while name: | |
--> 230 tail, name, buf = load_next(tail, tail, name, buf) | |
tail = <module 'os' from '/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/os.py'> | |
name = 'path' | |
buf = 'os' | |
global load_next = <function load_next at 0x991ae2c> | |
231 | |
232 # If tail is None, both get_parent and load_next found | |
/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg/IPython/lib/deepreload.py in load_next(mod=<module 'os' from '/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/os.py'>, altmod=<module 'os' from '/home/thomas/Code/virtualenvs/ipy-2to3/lib/python3.2/os.py'>, name='path', buf='os.path') | |
139 | |
140 if result is None: | |
--> 141 raise ImportError("No module named %.200s" % name) | |
global ImportError = undefined | |
name = 'path' | |
142 | |
143 return result, next, buf | |
ImportError: No module named path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment