OliverSherouse / wbdata

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

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

Closed MattMcFahn closed 6 months ago

MattMcFahn commented 4 years ago

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?

mazenarafat commented 4 years ago

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

MattMcFahn commented 4 years ago

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"

2) 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

mazenarafat commented 4 years ago

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

OliverSherouse commented 4 years ago

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.

MattMcFahn commented 4 years ago

Thanks!

walice commented 3 years ago

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!

OliverSherouse commented 3 years ago

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

walice commented 3 years ago

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 commented 3 years ago

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