whois-api-llc/python-simple-geoip

simple-geoip refuse imediately

Closed this issue · 2 comments

Hi,

i wrote the following code

`from simple_geoip import GeoIP

geoip = GeoIP("I put my api key here");

data = geoip.lookup("8.8.8.8")
print(data)`

and i get this error:

Traceback (most recent call last):
File "test.py", line 1, in
from simple_geoip import GeoIP
File "/home/fredlins/.local/lib/python3.8/site-packages/simple_geoip/init.py", line 16, in
from .geoip import GeoIP
File "/home/fredlins/.local/lib/python3.8/site-packages/simple_geoip/geoip.py", line 14, in
from .settings import API_URI, MAX_RETRIES, USER_AGENT
File "/home/fredlins/.local/lib/python3.8/site-packages/simple_geoip/settings.py", line 9, in
from platform import mac_ver, win32_ver, linux_distribution, system
ImportError: cannot import name 'linux_distribution' from 'platform' (/usr/lib/python3.8/platform.py)

Remember the code sample in README.md is wrong and with mistakes.

Dear Fred,

thank you for pointing this out. The issue has been fixed now; with the current github version your code should work.

WhoisXML API support