chembl / chembl_webservices_2

Source code of the ChEMBL web services.
https://www.ebi.ac.uk/chembl/ws
Other
16 stars 3 forks source link

REST API: Error when conducting a similarity search with order by pref name #177

Open nclopezo opened 5 years ago

nclopezo commented 5 years ago

Copied from https://github.com/chembl/GLaDOS/issues/1185

I'm using similarity search via the REST API and having issues when combining a similarity search with order_by.

Based on the SMILES similarity search example under the "Getting started" examples:

The original working example: https://www.ebi.ac.uk/chembl/api/data/similarity/CN1C(=O)C=C(c2cccc(Cl)c2)c3cc(ccc13)[C@@](N)(c4ccc(Cl)cc4)c5cncn5C/80

Returns a valid result.

Trying to add ?order_by=pref_name: https://www.ebi.ac.uk/chembl/api/data/similarity/CN1C(=O)C=C(c2cccc(Cl)c2)c3cc(ccc13)[C@@](N)(c4ccc(Cl)cc4)c5cncn5C/80?order_by=pref_name

Returns:

The object '' has an empty attribute 'similarity' and doesn't allow a default or null value.

Other queries (e.g. substructure) appear to be supporting order_by=pref_name without any issue.

The error has occurred for every valid SMILES string I've tried so far.