Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 <kylemariangelo@gmail.com>
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