[IPython-dev] Rmagic under Debian Squeeze problem

Javier Martínez-López javi.martinez.lopez@gmail....
Mon Jan 21 03:11:17 CST 2013


*Dear all,

I need to run R code with the IPython notebook in my Debian squeeze desktop
computer. **I can apparently load the rmagic extension but when I try to
run R code I get the following error message:

*AttributeError                            Traceback (most recent call last)
<ipython-input-4-9de0d21a54a2> in <module>()
----> 1 get_ipython()._run_cached_cell_magic(u'R', u'')

/home/user/ipython/IPython/core/interactiveshell.pyc in
_run_cached_cell_magic(self, magic_name, line)
   2550         cell = self._current_cell_magic_body
   2551         self._current_cell_magic_body = None
-> 2552         return self.run_cell_magic(magic_name, line, cell)
   2553
   2554     def run_cell(self, raw_cell, store_history=False, silent=False,
shell_futures=True):

/home/user/ipython/IPython/core/interactiveshell.pyc in
run_cell_magic(self, magic_name, line, cell)
   2130             magic_arg_s = self.var_expand(line, stack_depth)
   2131             with self.builtin_trap:
-> 2132                 result = fn(magic_arg_s, cell)
   2133             return result
   2134

<string> in R(self, line, cell, local_ns)

/home/user/ipython/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    189     # but it's overkill for just that one bit of state.
    190     def magic_deco(arg):
--> 191         call = lambda f, *a, **k: f(*a, **k)
    192
    193         if callable(arg):

/home/user/ipython/IPython/extensions/rmagic.py in R(self, line, cell,
local_ns)
    550                 return_output = False
    551         else:
--> 552             text_result, result = self.eval(code)
    553             text_output += text_result
    554

/home/user/ipython/IPython/extensions/rmagic.py in eval(self, line)
    156         ri.set_writeconsole(self.write_console)
    157         try:
--> 158             value = ri.baseenv['eval'](ri.parse(line))
    159         except (ri.RRuntimeError, ValueError) as exception:
    160             warning_or_other_msg = self.flush() # otherwise next
return seems to have copy of error

AttributeError: 'module' object has no attribute 'arse'


*After an iptest, I get:*

Status:
ERROR - 3 out of 10 test groups failed.
----------------------------------------
Runner failed: IPython.core
You may wish to rerun this one individually, with:
/usr/bin/python
/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/testing/iptest.py
IPython.core

----------------------------------------
Runner failed: IPython.extensions
You may wish to rerun this one individually, with:
/usr/bin/python
/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/testing/iptest.py
IPython.extensions

----------------------------------------
Runner failed: IPython.utils
You may wish to rerun this one individually, with:
/usr/bin/python
/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/testing/iptest.py
IPython.utils

*
And after the specific test for extensions**, I get:*

ERROR: IPython.extensions.tests.test_rmagic.test_Rconverter
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/nose-1.2.1-py2.6.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/tests/test_rmagic.py",
line 31, in test_Rconverter
    v = ip.run_line_magic('Rget', '-d datapy')
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/core/interactiveshell.py",
line 2062, in run_line_magic
    result = fn(*args)
  File "<string>", line 2, in Rget
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/core/magic.py",
line 191, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/rmagic.py",
line 299, in Rget
    return self.Rconverter(self.r(output[0]),dataframe=args.as_dataframe)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/rmagic.py",
line 107, in Rconverter
    if cols != ri.NULL:
AttributeError: 'module' object has no attribute 'NULL'

======================================================================
ERROR: IPython.extensions.tests.test_rmagic.test_cell_magic
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/nose-1.2.1-py2.6.egg/nose/case.py",
line 197, in runTest
    self.test(*self.arg)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/tests/test_rmagic.py",
line 60, in test_cell_magic
    ip.run_cell_magic('R', '-i x,y -o r,xc a=lm(y~x)', snippet)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/core/interactiveshell.py",
line 2093, in run_cell_magic
    result = fn(line, cell)
  File "<string>", line 2, in R
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/core/magic.py",
line 191, in <lambda>
    call = lambda f, *a, **k: f(*a, **k)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/rmagic.py",
line 516, in R
    text_result, result = self.eval(code)
  File
"/usr/local/lib/python2.6/dist-packages/ipython-0.13.1-py2.6.egg/IPython/extensions/rmagic.py",
line 158, in eval
    value = ri.baseenv['eval'](ri.parse(line))
AttributeError: 'module' object has no attribute 'parse'

----------------------------------------------------------------------
Ran 16 tests in 1.177s

FAILED (errors=2)

*... Does anyone has a clue?*

*Thank you very much!*

Kind regards,

Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130121/4202d713/attachment.html 


More information about the IPython-dev mailing list