Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- ImportError Traceback (most recent call last)
- <ipython-input-1-51ddf584899e> in <module>()
- ----> 1 get_ipython().magic('load http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py'>)
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/interactiveshell.py in magic(self, arg_s)
- 2181 magic_name, _, magic_arg_s = arg_s.partition(' ')
- 2182 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
- -> 2183 return self.run_line_magic(magic_name, magic_arg_s)
- 2184
- 2185 #-------------------------------------------------------------------------
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
- 2102 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
- 2103 with self.builtin_trap:
- -> 2104 result = fn(*args,**kwargs)
- 2105 return result
- 2106
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/magics/code.py in load(self, arg_s)
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/magic.py in <lambda>(f, *a, **k)
- 191 # but it's overkill for just that one bit of state.
- 192 def magic_deco(arg):
- --> 193 call = lambda f, *a, **k: f(*a, **k)
- 194
- 195 if isinstance(arg, collections.Callable):
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/magics/code.py in load(self, arg_s)
- 192 'or macro.')
- 193
- --> 194 contents = self.shell.find_user_code(args)
- 195 l = len(contents)
- 196
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/core/interactiveshell.py in find_user_code(self, target, raw, py_only, skip_encoding_cookie)
- 3028 try:
- 3029 if utarget.startswith(('http://', 'https://')):
- -> 3030 return openpy.read_py_url(utarget, skip_encoding_cookie=skip_encoding_cookie)
- 3031 except UnicodeDecodeError:
- 3032 if not py_only :
- /usr/local/lib/python3.2/dist-packages/ipython-1.0.dev-py3.2.egg/IPython/utils/openpy.py in read_py_url(url, errors, skip_encoding_cookie)
- 206 A unicode string containing the contents of the file.
- 207 """
- --> 208 from urllib.request import urlopen # Deferred import for faster start
- 209 response = urlopen(url)
- 210 buffer = io.BytesIO(response.read())
- /home/dennis/Dropbox/python/ipynb/urllib.py in <module>()
- 6 # For Python 3, change import urllib to urllib.request
- 7
- ----> 8 import urllib.request
- 9 u =urllib.request.urlopen('http://ctabustracker.com/bustime/map/getBusesForRoute.jsp?route=22')
- 10 data = u.read()
- ImportError: No module named request
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement