Want more features on Pastebin? Sign Up, it's FREE!
Guest

IPython Rmagic error

By: nborwankar on Jan 28th, 2013  |  syntax: Python  |  size: 1.70 KB  |  views: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. In [6]:
  2.  
  3. %R plot(X, Y)
  4. ---------------------------------------------------------------------------
  5. TypeError                                 Traceback (most recent call last)
  6. <ipython-input-6-b7a80db7b68d> in <module>()
  7. ----> 1 get_ipython().magic(u'R plot(X, Y)')
  8.  
  9. /Applications/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
  10.    2134         magic_name, _, magic_arg_s = arg_s.partition(' ')
  11.    2135         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
  12. -> 2136         return self.run_line_magic(magic_name, magic_arg_s)
  13.    2137
  14.    2138     #-------------------------------------------------------------------------
  15.  
  16. /Applications/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
  17.    2060                 args.append(sys._getframe(stack_depth).f_locals)
  18.    2061             with self.builtin_trap:
  19. -> 2062                 result = fn(*args)
  20.    2063             return result
  21.    2064
  22.  
  23. /Users/nitin/.ipython/extensions/rmagic.py in R(self, line, cell, local_ns)
  24.  
  25. /Applications/anaconda/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
  26.     189     # but it's overkill for just that one bit of state.
  27.     190     def magic_deco(arg):
  28. --> 191         call = lambda f, *a, **k: f(*a, **k)
  29.     192
  30.     193         if callable(arg):
  31.  
  32. /Users/nitin/.ipython/extensions/rmagic.py in R(self, line, cell, local_ns)
  33.     494             line_mode = False
  34.     495
  35. --> 496         code = ' '.join(args.code) + code
  36.     497
  37.     498         # if there is no local namespace then default to an empty dict
  38.  
  39. TypeError: coercing to Unicode: need string or buffer, dict found
clone this paste RAW Paste Data