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

README examples broken, can't figure out how to use the library #19

Open
anandijain opened this issue Sep 1, 2021 · 1 comment
Open

Comments

@anandijain
Copy link

anandijain commented Sep 1, 2021

Hello, thank you for this library.

I have pip installed this as the documentation says. However, the following example from the readme

from libchebipy._chebi_entity import ChebiEntity
chebi_entity = ChebiEntity(15903, download_dir="/path/to/directory")

gives TypeError: __init__() got an unexpected keyword argument 'download_dir'
so when I remove this kwarg, I get AttributeError: 'int' object has no attribute 'replace' because it expects a string, so then when I run chebi_entity = ChebiEntity("15903") I get ChebiException: ChEBI id 15903 invalid.

How do I actually use this library?

@sorenwacker
Copy link

sorenwacker commented Jun 8, 2022

Apparently, the function cannot handle int

Try:

chebi_entity = ChebiEntity("15903", download_dir="/path/to/directory")


chebi_entity.get_name()
>>> 'beta-D-glucose'

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

No branches or pull requests

2 participants