OliverSherouse / wbdata

A python library for accessing world bank data
GNU General Public License v2.0
180 stars 55 forks source link

WB data doesn't go beyond 1996 for some countries #65

Open e184633 opened 3 years ago

e184633 commented 3 years ago

Thank you for this helpful package! One of the issues I faced has to do with Taiwan data. If one tries to query it on its own (like in wbdata.get_data('IC.LGL.CRED.XQ', country=['TWN'])), I get

<ipython-input-76-471bf8328dd6> in <module>()
----> 1 wbdata.get_data('IC.LGL.CRED.XQ', country=['TWN'])

1 frames
/usr/local/lib/python3.6/dist-packages/wbdata/fetcher.py in fetch(url, args, cache)
    122         response = get_response(url, args, cache=cache)
    123         try:
--> 124             results.extend(response[1])
    125             this_page = response[0]["page"]
    126             pages = response[0]["pages"]

TypeError: 'NoneType' object is not iterable

However, If I do wbdata.get_data('IC.LGL.CRED.XQ', country=['TWN', 'HKG']), where the data for Taiwan is duplicated from the data for HK or no data at all (it is not reproducible really), i.e., silently failing to fetch data for Taiwan (which I assume doesn't exist in WB indicator data).

Thank you for your time.