`%load_ext rmagic` fails when legacy ipy_user_conf.py is installed (in ipython 0.13.1 / OSX 10.8) #3004

davclark opened this Issue Mar 6, 2013 · 5 comments

3 participants


I was experiencing strange errors from %load_ext rmagic, which IPython reported coming from this code:

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/__init__.py in <module>()
     16 except KeyError:
     17     tmp = os.popen("R RHOME")
---> 18     R_HOME = tmp.readlines()
     19     tmp.close()
     20     del(tmp)

The fix was a simple removal of the old conf, and creation of a new on using ipython profile create.

I'm not sure exactly what the problem is, so I include all non-commented lines of my (pretty vanilla) legacy ipy_user_conf.py:

   22 : ip = IPython.ipapi.get()
   55 :     o.system_verbose = 0
   71 :     o.autoexec.append('%colors LightBG')
  105 : def import_all(modules):
  106 :     """ Usage: import_all("os sys") """ 
  107 :     for m in modules.split():
  108 :         ip.ex("from %s import *" % m)
  109 : 
  111 :     """ Execute a file in user namespace """
  112 :     ip.ex('execfile("%s")' % os.path.expanduser(fname))
IPython member

Can someone with R magic experience explain how this makes any sense?


Before figuring out if it makes sense, can someone see if they can replicate it? Steps to replicate are simply copying the ipy_user_conf.py into (I think) your .ipython directory. I'm guessing it's the presence of the file triggering some different initialization.

IPython member

I can't reproduce it. That file is completely ignored by IPython ≥ 0.11, except to show a warning that it was ignored.


Sounds like gremlins then. I'll close this. If someone else can reproduce it, then re-open!

@davclark davclark closed this Jul 15, 2013
IPython member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment