dynamo-release
dynamo-release copied to clipboard
save h5ad error [TypeError: Can't implicitly convert non-string objects to strings]
- [ ] 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!
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.
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.
@Sichao25 Hi, the version I used is 1.1.0.
I think you can get rid of the issue by downloading from github pip install git+https://github.com/aristoteleo/dynamo-release.
@Sichao25 hi, the 1.3.2 version also error,how do I solve this problem? Thanks a lot!
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.
@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,
but when I try to load dynamo,it turns :
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.
@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!
No problem. I will keep this issue open until we have the new version released.
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
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