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

iso_3166-1.csv missing in v 1.3.0 ? #333

Open
noselasd opened this issue Nov 5, 2024 · 0 comments
Open

iso_3166-1.csv missing in v 1.3.0 ? #333

noselasd opened this issue Nov 5, 2024 · 0 comments

Comments

@noselasd
Copy link

noselasd commented Nov 5, 2024

I upgraded from ipwhois 1.2.0 to 1.3.0 and now:


$ ipython
Python 3.12.7 (main, Oct 28 2024, 11:28:41) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.29.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from ipwhois.utils import get_countries

In [2]: get_countries()
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[2], line 1
----> 1 get_countries()

File ~/.virtualenvs/whoistest/lib/python3.12/site-packages/ipwhois/utils.py:246, in get_countries(is_legacy_xml)
    242 log.debug('Opening country code CSV: {0}'.format(
    243         str(data_dir) + '/data/iso_3166-1_list_en.xml'))
    245 # Create the country codes file object.
--> 246 f = io.open(str(data_dir) + '/data/iso_3166-1.csv', 'r',
    247             encoding='utf-8')
    249 # Create csv reader object.
    250 csv_reader = csv.reader(f, delimiter=',', quotechar='"')

FileNotFoundError: [Errno 2] No such file or directory: '/home/noselasd/.virtualenvs/whoistest/lib/python3.12/site-packages/ipwhois/data/iso_3166-1.csv'

In [3]:
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

No branches or pull requests

1 participant