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

Problem with unichem.structure #119

Closed
sbgsbc opened this issue May 16, 2022 · 4 comments
Closed

Problem with unichem.structure #119

sbgsbc opened this issue May 16, 2022 · 4 comments

Comments

@sbgsbc
Copy link

sbgsbc commented May 16, 2022

I'm enabled to get an answer to :

  from chembl_webresource_client.unichem import unichem_client as unichem

  ret = unichem.structure('AAOVKJBEBIDNHE-UHFFFAOYSA-N', 1)

Answer is :

MaxRetryError: HTTPSConnectionPool(host='www.ebi.ac.uk', port=443): Max retries exceeded with url: /unichem/legacy/rest/structure/AAOVKJBEBIDNHE-UHFFFAOYSA-N/1 (Caused by ResponseError('too many 404 error responses'))

But

  ret = unichem.get('AAOVKJBEBIDNHE-UHFFFAOYSA-N', all=True)

is fine.

Is there a problem with the structure() method ?

I'm using chembl_webresource_client 0.10.8 installalled from conda-forge.

Many thanks.

Stephane

@eloyfelix
Copy link
Member

Hi Stephane,

The unichem.structure function reutrns the structure for a given pair of source compound id and source id:

from chembl_webresource_client.unichem import unichem_client as unichem
ret = unichem.structure('CHEMBL12', 1)
print(ret)

[{'standardinchikey': 'AAOVKJBEBIDNHE-UHFFFAOYSA-N',
  'standardinchi': 'InChI=1S/C16H13ClN2O/c1-19-14-8-7-12(17)9-13(14)16(18-10-15(19)20)11-5-3-2-4-6-11/h2-9H,10H2,1H3'}]

@ricardoaat

@sbgsbc
Copy link
Author

sbgsbc commented May 16, 2022 via email

@eloyfelix
Copy link
Member

which version of the library are you using? could you please try with the latest one? 0.10.8

@sbgsbc
Copy link
Author

sbgsbc commented May 16, 2022 via email

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