wbdata icon indicating copy to clipboard operation
wbdata copied to clipboard

Master branch doesn't reflect the new World Bank API address

Open MattMcFahn opened this issue 4 years ago • 9 comments

The World Bank API recently updated their API address, from "http://api.worldbank.org", to "http://api.worldbank.org/v2".

It looks like the wbdata package's master branch has been stale for the past 4 years, updates have only been happening on dev. I've pip installed the dev branch instead to keep the library functioning.

Would it be possible to update the new World Bank API address on the master branch?

MattMcFahn avatar Jun 22 '20 09:06 MattMcFahn

I am having the same problem. Wbdata no longer works, and I have many modules highly dependent on this package. Would appreciate a fix.

mazenarafat avatar Jun 25 '20 10:06 mazenarafat

In case it helps, I can offer two options for a fix in the meantime:

  1. install the dev branch instead of master

Run "pip install https://github.com/OliverSherouse/wbdata/archive/dev.zip"

  1. manually change the API address in your local version of the wbdata package:

Open up \wbdata\api.py (from wherever your wbdata package is installed)

Scroll down to line 38 and make the following change From: BASE_URL = "http://api.worldbank.org"

To: BASE_URL = "http://api.worldbank.org/v2"

& save the file

MattMcFahn avatar Jun 25 '20 10:06 MattMcFahn

I tried the second approach and it seems to work very well. Many thanks for your prompt help.

mazenarafat avatar Jun 25 '20 11:06 mazenarafat

The dev branch is all but ready for release; I just need to finish writing the documentation. I'll try to get this done very soon.

OliverSherouse avatar Jun 25 '20 11:06 OliverSherouse

Thanks!

MattMcFahn avatar Jun 25 '20 12:06 MattMcFahn

Has this issue been fixed? Running pip install wbdata results in bugs, but @MattMcFahn 's suggestion to run pip install https://github.com/OliverSherouse/wbdata/archive/dev.zip works fine. I'm using wbdata in a container and wondering if I need to update my Dockerfile.

Thanks for a great package!

walice avatar Aug 13 '20 23:08 walice

The issue is fixed; what are the bugs you get when you run pip install wbdata?

OliverSherouse avatar Aug 14 '20 01:08 OliverSherouse

Looks like the package is not working when I use it in a Docker container running on a Google VM (worked like a charm before).

This is the error when I run the MWE from the documentation:

image

My Dockerfile includes pip install wbdata which worked fine before.

walice avatar Aug 14 '20 04:08 walice

The package, however, works when I include pip install https://github.com/OliverSherouse/wbdata/archive/dev.zip in my Dockerfile instead.

walice avatar Aug 14 '20 05:08 walice