webchem icon indicating copy to clipboard operation
webchem copied to clipboard

Translating CID into common name report bad request?

Open wanglu2014 opened this issue 4 years ago • 3 comments

For example, we want to translate 5564 into Triclosan With code like that cts_convert("5564", from = "pubchem cid", to="Chemical Name") I find it return NA and show a massage of bad request. Is it my code is wrong or a bug?

wanglu2014 avatar May 22 '21 02:05 wanglu2014

Hi,

this seems to be a problem with the CTS. It is not your code or a bug in webchem It appears that any API call with toIdentifier:"Chemical Name" currently throws an exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

marcodilger avatar May 23 '21 20:05 marcodilger

Thanks for letting us know @wanglu2014 and thanks for sussing out the issue @marcodilger. The CTS API relies on many other APIs working so occasionally things break and the often take a while to get fixed. Looks like maybe someone has reported this bug already, but might be helpful to report to CTS, especially if this isn't the same bug. https://bitbucket.org/fiehnlab/ctsproxy/issues/34/failure-to-call-chemical-name

Aariq avatar May 23 '21 20:05 Aariq

This seems to be working again, although the issue on CTS's end hasn't been closed

Aariq avatar Jan 05 '22 18:01 Aariq