Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: Unknown obs type is uncalled for! #1

Closed
rcannood opened this issue Nov 7, 2024 · 2 comments
Closed

AssertionError: Unknown obs type is uncalled for! #1

rcannood opened this issue Nov 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rcannood
Copy link
Member

rcannood commented Nov 7, 2024

Report

da <- reticulate::import("dummy_anndata")

test_names <- names(da$vector_generators)

name <- test_names[[1]]

data <- da$generate_dataset(obs_types = name)

Results in

Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
  AssertionError: Unknown obs type

Version information

-----
dummy_anndata       0.0.1
session_info        1.0.0
-----
abrt_exception_handler3     NA
anndata                     0.10.3
asciitree                   NA
cloudpickle                 3.0.0
cython_runtime              NA
cytoolz                     0.12.2
dask                        2024.8.1
dateutil                    2.8.2
dill                        0.3.8
h5py                        3.10.0
jinja2                      3.1.2
markupsafe                  2.1.3
msgpack                     1.0.6
natsort                     8.4.0
numcodecs                   0.13.0
numpy                       1.26.2
packaging                   24.1
pandas                      2.2.2
paste                       NA
psutil                      5.9.8
pyarrow                     15.0.0
pydot                       2.0.0
pyparsing                   3.1.2
pytz                        2023.3.post1
scipy                       1.12.0
six                         1.16.0
sphinxcontrib               NA
tblib                       3.0.0
tlz                         0.12.2
toolz                       0.12.0
torch                       2.2.0+rocm5.7
torchgen                    NA
tqdm                        4.66.5
typing_extensions           NA
xxhash                      NA
yaml                        6.0.1
zarr                        2.18.2
-----
Python 3.12.7 (main, Oct  1 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)]
Linux-6.11.5-200.fc40.x86_64-x86_64-with-glibc2.39
-----
Session information updated at 2024-11-07 09:15
@rcannood rcannood added the bug Something isn't working label Nov 7, 2024
@LouiseDck
Copy link
Collaborator

These parameters (e.g. layer_types, obs_types, var_types etc) accept non-string iterables as input, meaning that you need to pass a Python list or set to them, not just one string.

I've added documentation and more informative checks in #4, does that solve your problem?

@rcannood
Copy link
Member Author

rcannood commented Nov 7, 2024

I see, so I should use the following instead:

data <- da$generate_dataset(
  obs_types = list(name),
  var_types = list(name),
  layer_types = list(),
  obsm_types = list(),
  varm_types = list(),
  obsp_types = list(),
  varp_types = list(),
  uns_types = list()
)

@rcannood rcannood closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants