Conversion rules for `rpy2.robjects` appear to be missing in Streamlit App

96 Views Asked by At

Hi I am running rpy2 under the hood of a streamlit app and I’m getting the following error:

Conversion rules for `rpy2.robjects` appear to be missing. Those rules are in a Python contextvars.ContextVar. This could be caused by multithreading code not passing context to the thread.

When I run the code outside of streamlit then it runs perfectly.

How might I go about fixing this error and getting rpy2 to run inside the streamlit app?

Version file:
Name: streamlit
Version: 1.27.2

Name: rpy2
Version: 3.5.14

Name: python
Version: 3.11.4
0

There are 0 best solutions below