You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/decorator.py:decorator-gen-127> in get_dataframe(indicators, country, data_date, freq, source, convert_date, keep_levels, cache)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in uses_pandas(f, *args, **kwargs)
83 if not pd:
84 raise ValueError("Pandas must be installed to be used")
---> 85 return f(*args, **kwargs)
86
87
A query using wbdata does not return data, despite it being available on the WB website. For example, compare:
https://databank.worldbank.org/reports.aspx?source=worldwide-governance-indicators#`
With the following script:
import wbdata
data_dates = (datetime.datetime(2019,1,1), datetime.datetime(2019,1,1))
MTQ_missing = wbdata.get_dataframe({'PV.EST':'values'},
country=('MTQ'), data_date=data_dates, convert_date=False, keep_levels=True)
Which returns:
IndexError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/fetcher.py in fetch(url, args, cache)
123 try:
--> 124 results.extend(response[1])
125 this_page = response[0]["page"]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
in
----> 1 MTQ_missing = wbdata.get_dataframe({'PV.EST':'values'},
2 country=('MTQ'), data_date=data_dates, convert_date=False, keep_levels=True)
</Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/decorator.py:decorator-gen-127> in get_dataframe(indicators, country, data_date, freq, source, convert_date, keep_levels, cache)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in uses_pandas(f, *args, **kwargs)
83 if not pd:
84 raise ValueError("Pandas must be installed to be used")
---> 85 return f(*args, **kwargs)
86
87
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in get_dataframe(indicators, country, data_date, freq, source, convert_date, keep_levels, cache)
480 :returns: a WBDataFrame
481 """
--> 482 serieses = [
483 (
484 get_series(
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in (.0)
482 serieses = [
483 (
--> 484 get_series(
485 indicator=indicator,
486 country=country,
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in get_series(indicator, country, data_date, freq, source, convert_date, column_name, keep_levels, cache)
184 :returns: WBSeries
185 """
--> 186 raw_data = get_data(
187 indicator=indicator,
188 country=country,
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/api.py in get_data(indicator, country, data_date, freq, source, convert_date, pandas, column_name, keep_levels, cache)
287 if source:
288 args["source"] = source
--> 289 data = fetcher.fetch(query_url, args, cache=cache)
290 if convert_date:
291 data = convert_dates_to_datetime(data)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wbdata/fetcher.py in fetch(url, args, cache)
128 try:
129 message = response[0]["message"][0]
--> 130 raise RuntimeError(
131 f"Got error {message['id']} ({message['key']}): "
132 f"{message['value']}"
RuntimeError: Got error 120 (Invalid value): The provided parameter value is not valid
The text was updated successfully, but these errors were encountered: