Teichlab / cellphonedb

MIT License
342 stars 105 forks source link

fail to run plot #126

Closed YiqunCao closed 4 years ago

YiqunCao commented 5 years ago

Hi,

I failed to run both plots in Linux with the following error:

RuntimeError: found a situation in which we try to build a type recursively. This is known to occur e.g. in ``struct s { void(*callable)(struct s); }''.

Could you help to solve this? Thanks!

mvento commented 5 years ago

Hi @YiqunCao,

Thanks for using CellPhoneDB. Some questions:

Using plots requires R and some R libraries. Some people experiments compatibility errors. To avoid these errors, we highly recommend using CellPhoneDB Docker image.

Best

djh1991 commented 5 years ago

Hi, I get the same error as follows: """ [root@localhost example_data]# cellphonedb plot dot_plot [ ][APP][21/10/19-08:06:36][ERROR] Unexpected error Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/cellphonedb/src/api_endpoints/terminal_api/plot_terminal_api_endpoints/plot_terminal_commands.py", line 38, in dot_plot columns=columns) File "/usr/local/lib/python3.6/site-packages/cellphonedb/src/plotters/r_plotter.py", line 35, in wrapper from rpy2.rinterface_lib.embedded import RRuntimeError File "/usr/local/lib/python3.6/site-packages/rpy2/rinterface_lib/embedded.py", line 7, in from . import openrlib File "/usr/local/lib/python3.6/site-packages/rpy2/rinterface_lib/openrlib.py", line 41, in _get_dataptr_fallback) File "/usr/local/lib/python3.6/site-packages/rpy2/rinterface_lib/openrlib.py", line 26, in _get_symbol_or_fallback res = getattr(rlib, symbol) RuntimeError: found a situation in which we try to build a type recursively. This is known to occur e.g. in ``struct s { void(*callable)(struct s); }''. Please report if you get this error and really need support for your case. """ R 3.6.1 python 3.6 system : centos 8 It can find the R and R librarires Correctly, but can not get the function by getattr。 Does it was a bug when run rpy2 in centos8?

babiddy commented 5 years ago

I helped someone in our lab who was running into the same error. We followed the advice from here, and ran this command pip install cffi==1.12.3 in the virtual environment that cellphonedb is installed in. This fixed the issue for us.

mvento commented 5 years ago

Hi @babiddy,

I very appreciate your help. We will add this library to Python requirements.

Best

babiddy commented 5 years ago

Hello @mvento!

I'm happy I could help. CellPhoneDB is a great tool and has been useful for us. Can't wait to see how it develops!

Best Brent

djh1991 commented 5 years ago

Hi @babiddy @mvento Thank you for your advices。 I tried again and resolved this question.