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

save h5ad error [TypeError: Can't implicitly convert non-string objects to strings] #622

Closed
3 tasks
Jingle0814 opened this issue Nov 29, 2023 · 11 comments
Closed
3 tasks
Labels
bug Something isn't working Stale

Comments

@Jingle0814
Copy link

  • I am sure this issue is not simply a general python programming problem
    (if so, please google the answers).
  • I have searched github issues and confirm this issue has not reported previously.
  • I have confirmed this bug is not related to dynamo version and it exists on the latest version of dynamo.

--- Hi,

If this is a question and not a bug report or enhancement request, please post to our Github Discussions channel at https://github.com/aristoteleo/dynamo-release/discussions

Describe the bug
A clear and concise description of what the bug is.
Thank you to your team for developing dynamo, I encountered an error while running dynamo.
I want to save the processed result of dynamo but could not.
first, I encountered "TypeError: Can't implicitly convert non-string objects to strings

Above error raised while writing key 'beta' of <class 'h5py._hl.group.Group'> to /"
And then I change the .var['beta'] to string type: adata_hsc_raw.var['beta'] = adata_hsc_raw.var['beta'].astype(str) .
But it reports the same error with 'gamma'.
How do I solve this problem? Thanks a lot!

image
To Reproduce
The code that produced the bug:

Minimal data may be provided to reproduce the bug
Traceback
Post the error message from the Tracebook output:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

session_info.show():
Install session-info via pip install session-info and post the output after running session_info.show()

import dynamo
import session_info
session_info.show()

Additional context
Add any other context about the problem here.

@Jingle0814 Jingle0814 added the bug Something isn't working label Nov 29, 2023
@Sichao25
Copy link
Collaborator

Hi, thanks for reporting this issue. Could you tell me which version of Dynamo you are using? I feel like this may be related to a recent pull request. It is not available in the released version yet.

@Jingle0814
Copy link
Author

@Sichao25 Hi, the version I used is 1.1.0.

@Sichao25
Copy link
Collaborator

I think you can get rid of the issue by downloading from github pip install git+https://github.com/aristoteleo/dynamo-release.

@Jingle0814
Copy link
Author

@Sichao25 hi, the 1.3.2 version also error,how do I solve this problem? Thanks a lot!
image

@Sichao25
Copy link
Collaborator

Sichao25 commented Dec 4, 2023

Sorry for not making this clear. You may need to a later version like pip install git+https://github.com/aristoteleo/dynamo-release@master. Besides, we add a new saving function called dyn.export_h5ad(). (The write_h5ad may also work, depending on what analysis you have performed).

We will have a new version coming soon. That will make everything easier.

@Jingle0814
Copy link
Author

@Sichao25 hi thanks to your reply. I try the code:
python -m pip install git+https://github.com/aristoteleo/dynamo-release@master
and it success,
image

but when I try to load dynamo,it turns :
image

@Sichao25
Copy link
Collaborator

Sichao25 commented Dec 4, 2023

This is a compatibility issue with Ipython. It forces the command line to enter the Ipython mode after importing the Dynamo. You can use it like a notebook. To solve this problem, you may uninstall Ipython, or avoid using the command line.

@Jingle0814
Copy link
Author

@Sichao25 Thank you very much for your prompt reply! By installing the latest version of dynamo and using notebook to analysis, I can save the h5ad files normally with dyn.export_h5ad() function.
Thanks again!

@Sichao25
Copy link
Collaborator

Sichao25 commented Dec 5, 2023

No problem. I will keep this issue open until we have the new version released.

Copy link

github-actions bot commented Mar 5, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the Stale label Mar 5, 2024
@Sichao25 Sichao25 removed the Stale label Mar 8, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants