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

webresource client: TypeError: 'NoneType' object has no attribute '__getitem__ #53

Closed czodrowskilab closed 4 years ago

czodrowskilab commented 5 years ago

I just installed the web client into a new Conda env and ran this piece of code (taken from https://github.com/chembl/chembl_webresource_client):

from chembl_webresource_client.new_client import new_client target = new_client.target activity = new_client.activity herg = target.search('herg')[0] herg_activities = activity.filter(target_chembl_id=herg['target_chembl_id']).filter(standard_type="Ki")

Based on the issue referenced below: pip install --force-reinstall gevent==1.2.2 pip install --force-reinstall greenlet==0.4.12

I'm ending up with this error message: TypeError: 'NoneType' object has no attribute 'getitem'

Any clue what is going wrong?

Hi everyone, I have just been checking this in python 2.7 and the main issue are the updates to gevent and greenlet libraries, so I would suggest to execute the following pip commands:

pip install --force-reinstall gevent==1.2.2
pip install --force-reinstall greenlet==0.4.12

_Originally posted by @juanfmx2 in https://github.com/chembl/chembl_webresource_client/issues/38#issuecomment-402119854_

eloyfelix commented 4 years ago

we just release a new version of the client dropping py2 compatibility and fixing any issue with py3.7.

please install it using pip:

pip install chembl_webresource_client