Executing source within robjects.r() causes crash

Issue #75 resolved
Dav Clark created an issue

I don't know if this is a general problem, but here is a simple way to recreate the bug. Create a trivial .R file that ends with a function definition, e.g.:

{{{ cat > test.R f <- function() 1 ctrl-D }}}

Then in python having loading robjects somehow, do:

{{{ rpy2.robjects.r('source("test.R")') }}}

I get an error on OS X 10.6.8, 64-bit python 2.7.2 [EPD 7.1 actually], rpy2 2.2.1

{{{ /site-packages/rpy2/robjects/vectors.pyc in repr(self) 514 type(x), 515 os.linesep, --> 516 x.repr_content())) 517 else: 518 for i, x in enumerate(self[:3]):

AttributeError: 'SignatureTranslatedFunction' object has no attribute 'repr_content' }}}

You can make the error go away by adding some other statement to the end of the file. For example, the token '1'.

Comments (1)

  1. Log in to comment