Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Error when using plot function #381

Open
FionaMoon opened this issue Jul 21, 2022 · 5 comments
Open

Error when using plot function #381

FionaMoon opened this issue Jul 21, 2022 · 5 comments

Comments

@FionaMoon
Copy link

FionaMoon commented Jul 21, 2022

Hi all,
I met a strange problem which never exists before.
Every time I run cellphonedb plot heatmap_plot, I'll get errors like this

Warning message:
In options(stringsAsFactors = TRUE) :
  'options(stringsAsFactors = TRUE)' is deprecated and will be disabled
Error: package or namespace load failed for ‘methods’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘datasets’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘utils’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘grDevices’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘graphics’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘stats’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Error: package or namespace load failed for ‘methods’:
 .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
During startup - Warning messages:
1: package "methods" in options("defaultPackages") was not found 
2: package ‘datasets’ in options("defaultPackages") was not found 
3: package ‘utils’ in options("defaultPackages") was not found 
4: package ‘grDevices’ in options("defaultPackages") was not found 
5: package ‘graphics’ in options("defaultPackages") was not found 
6: package ‘stats’ in options("defaultPackages") was not found 
7: package ‘methods’ in options("defaultPackages") was not found 
Error: .onLoad failed in loadNamespace() for 'methods', details:
  call: assign(".methodsNamespace", where, baseenv())
  error: cannot add binding of '.methodsNamespace' to the base environment
Fatal error: unable to initialize the JIT

Any suggestions for me?
Thank you inadvance!

@prete
Copy link
Collaborator

prete commented Jul 21, 2022

Hi @FionaMoon, thank you for using CellPhoneDB. Could you please let us know which version of R (R --version) and which version of rpy2 (pip show rpy2) do you have installed on your environment?

@FionaMoon
Copy link
Author

Hi prete,
My R version is

R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-conda-linux-gnu (64-bit)

My rpy2 version is

pip show rpy2
Name: rpy2
Version: 3.5.2
Summary: Python interface to the R language (embedded R)
Home-page: https://rpy2.github.io
Author: Laurent Gautier
Author-email: [email protected]
License: GPLv2+
Location: /xtdisk/miniconda/envs/cpdb/lib/python3.8/site-packages
Requires: cffi, jinja2, pytz, tzlocal
Required-by: CellPhoneDB

Thank you for your help!

@FionaMoon
Copy link
Author

And it seems have another problem like in #363, markupsafe need to be downgrading. If I don't do this I 'll got error:

ImportError: cannot import name 'soft_unicode' from 'markupsafe'

@mostafaismail11
Copy link

I have the error of cannot import name 'soft_unicode' from 'markupsafe' what should i do ?

@prete
Copy link
Collaborator

prete commented Aug 23, 2022

pip install -U markupsafe<=2.0.1 should solve your markupsafe issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants