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

get_cid cannot handle # #276

Closed
stephanflemming opened this issue Aug 16, 2020 · 1 comment
Closed

get_cid cannot handle # #276

stephanflemming opened this issue Aug 16, 2020 · 1 comment

Comments

@stephanflemming
Copy link

Hi,

I try to fetch the pubchem cid of the following smiles N#CC4=C(N1CCCNCC1)N(CC=C(Cl)Cl)C5C(=O)N(Cc3nccc2ccccc23)C=NC4=5 (Pubchem entry https://pubchem.ncbi.nlm.nih.gov/compound/23633624) via

get_cid("N#CC4=C(N1CCCNCC1)N(CC=C(Cl)Cl)C5C(=O)N(Cc3nccc2ccccc23)C=NC4=5", from = "smiles")

and run into the following error

Querying N#CC4=C(N1CCCNCC1)N(CC=C(Cl)Cl)C5C(=O)N(Cc3nccc2ccccc23)C=NC4=5. OK (HTTP 200).
Error: lexical error: invalid char in json text.
                                       <?xml version="1.0"?> <PC-Compo
                     (right here) ------^

Probably it's the # that causes this error.

Thanks,
Stephan

@Aariq
Copy link
Collaborator

Aariq commented Aug 17, 2020

Hi Stephan,

You're absolutely correct that # was the problem. We fixed this in the development version of webchem, so you can either install it with remotes::install_github("ropensci/webchem") or pass your SMILES query through URLencode().

-Eric

Note: This is a duplicate of #269

@Aariq Aariq closed this as completed Aug 17, 2020
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