question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the current behavior

rpy2 installed by default is an outdated version of rpy2 (3.4.5).

import rpy2
rpy2.__version__

Describe the expected behavior

The code above returns 3.5.5.

What web browser you are using

Firefox.

Additional context

https://colab.research.google.com/drive/1pepfsZT8Zak_IxbH3XYxofUAogGkUn4c?usp=sharing

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
bdwaldiecommented, Nov 1, 2022

It looks like r2py has been updated to the latest version, but after the update I am unable to run any commands using cell magic.

Running the following in a new notebook:

%load_ext rpy2.ipython

%%R x <- seq(0, 2*pi, length.out=50) x

Returns this error:


NotImplementedError Traceback (most recent call last) <ipython-input-2-cc2a3aca7f04> in <module> ----> 1 get_ipython().run_cell_magic(‘R’, ‘’, ‘x <- seq(0, 2*pi, length.out=50)\nx\n’)

8 frames <decorator-gen-122> in R(self, line, cell, local_ns)

/usr/local/lib/python3.7/dist-packages/rpy2/robjects/conversion.py in _py2rpy(obj) 240 raise NotImplementedError( 241 “Conversion ‘py2rpy’ not defined for objects of type ‘%s’” % –> 242 str(type(obj)) 243 ) 244

NotImplementedError: Conversion ‘py2rpy’ not defined for objects of type ‘<class ‘str’>’


Here is a link to a notebook with the code above that shows the error. https://colab.research.google.com/drive/1digJ6kwHEu7192lEN15qtDz0-ccdSJXG?usp=sharing

0reactions
lgautiercommented, Nov 5, 2022

I opened an issue to upgrade ipykernel: https://github.com/googlecolab/colabtools/issues/3212

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changes in rpy2 — rpy2 3.4.5 documentation
Setup.py has no longer a (possibly outdated) static hardcoded version number for rpy2. Testing no longer stops with an error in the absence...
Read more >
Python package rpy2 available by default is outdated. #1808
Describe the current behavior: By default the R magic is using an outdated version of rpy2 , no longer compatible with the default...
Read more >
Is R an outdated programming language? - Quora
No, R is not an outdated programming language. It is one of the widely used programming languages for statistical analysis. Apart from that,...
Read more >
What causes Python libraries to become outdated? - Reddit
I've been trying to use some libraries I used in version 3.8 in 3.10, but it says they are "outdated" in pip. What...
Read more >
How to check if a CRAN mirror is outdated? - Stack Overflow
One way is to look at $CRANMIRROR/src/contrib and sort by date (by clicking twice on date) so that you can compare the most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found