A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ipython/ipython/issues/1201/ below:

%env magic fails with Python 3.2 · Issue #1201 · ipython/ipython · GitHub

%env magic command fails with Python 3.2 because os.environ does not have an attribute called "data" - see traceback below.
Platform is Python 3.2.2, IPython 0.12, Mac OS X 10.7.2

Traceback
--------------
Python 3.2.2 (v3.2.2:137e45f15c0b, Sep  3 2011, 17:28:59) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: %env

AttributeError                            Traceback (most recent call last)
/Users/colin/Python/readline-6.2.1/<ipython-input-1-d53f11c3c8bf> in <module>()
----> 1 get_ipython().magic('env')

/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ipython-0.12-py3.2.egg/IPython/core/interactiveshell.py in magic(self, arg_s, next_input)
   1997                 self._magic_locals = sys._getframe(1).f_locals
   1998             with self.builtin_trap:
-> 1999                 result = fn(magic_args)
   2000             # Ensure we're not keeping object references around:

   2001             self._magic_locals = {}

/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/ipython-0.12-py3.2.egg/IPython/core/magic.py in magic_env(self, parameter_s)
   2923         """List environment variables."""
   2924 
-> 2925         return os.environ.data
   2926 
   2927     def magic_pushd(self, parameter_s=''):

AttributeError: '_Environ' object has no attribute 'data'

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4