Skip to content

fix: Fix country module not working as file glob in line 30 returns data/countries.json instead of data/countries/*.json#14

Open
Numbers00 wants to merge 1 commit intomanumanoj0010:masterfrom
Numbers00:master
Open

fix: Fix country module not working as file glob in line 30 returns data/countries.json instead of data/countries/*.json#14
Numbers00 wants to merge 1 commit intomanumanoj0010:masterfrom
Numbers00:master

Conversation

@Numbers00
Copy link

@Numbers00 Numbers00 commented Apr 16, 2024

Fixes #13 by modifying line 30 in Countrydetails/countries.py from:

country_files = [files for files in glob(data_files + '*.json')]

and prepending / to *.json like so:

country_files = [files for files in glob(data_files + '/*.json')]

This fix was tested on Ubuntu 22.04; unsure on whether it works on other platforms.

Screenshots

The country.info() example in the README.md works with the change in effect:

image

…ata/countries.json instead of data/countries/*.json

Signed-off-by: Numbers00 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot get country-level data

1 participant