chembl / chembl_webresource_client

Official Python client for accessing ChEMBL API
https://www.ebi.ac.uk/chembl/api/data/docs
Other
368 stars 95 forks source link

svg+xml is not an available format (['xml', 'json', 'yaml', 'svg', 'png']) #78

Closed zhangshd closed 4 years ago

zhangshd commented 4 years ago

Hi, I have something wrong when I from chembl_webresource_client.new_client import new_client.

Got errors below:

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-5-1be45663ce9d> in <module>
----> 1 from chembl_webresource_client.new_client import new_client

~/anaconda3/envs/tf36/lib/python3.6/site-packages/chembl_webresource_client/new_client.py in <module>
     65 #-----------------------------------------------------------------------------------------------------------------------
     66 
---> 67 new_client = client_from_url(Settings.Instance().NEW_CLIENT_URL + '/spore')
     68 
     69 #-----------------------------------------------------------------------------------------------------------------------

~/anaconda3/envs/tf36/lib/python3.6/site-packages/chembl_webresource_client/new_client.py in client_from_url(url, base_url)
     57         qs = QuerySet(model=model)
     58         if default_format != 'xml':
---> 59             qs.set_format(default_format)
     60         setattr(client, name, qs)
     61 

~/anaconda3/envs/tf36/lib/python3.6/site-packages/chembl_webresource_client/query_set.py in set_format(self, frmt)
    251 
    252     def set_format(self, frmt):
--> 253         self.query.set_format(frmt)
    254 
    255 #-----------------------------------------------------------------------------------------------------------------------

~/anaconda3/envs/tf36/lib/python3.6/site-packages/chembl_webresource_client/url_query.py in set_format(self, frmt)
    234         available_formats = self.model.formats or ('json', 'xml')
    235         if frmt not in available_formats:
--> 236             raise Exception('{0} is not an available format ({1})'.format(frmt, available_formats))
    237         self.frmt = frmt
    238         self.rewind()

Exception: svg+xml is not an available format (['xml', 'json', 'yaml', 'svg', 'png'])

What can I do for it?

---Best Wishes.

zhangshd commented 4 years ago

@eloyfelix

eloyfelix commented 4 years ago

Hi, did you update to version 0.10.1?

zhangshd commented 4 years ago

Hi, did you update to version 0.10.1?

Thanks. None errors after my updating.