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

Package does not seem to work #47

Closed
fredrikekre opened this issue Apr 26, 2021 · 4 comments · Fixed by #49
Closed

Package does not seem to work #47

fredrikekre opened this issue Apr 26, 2021 · 4 comments · Fixed by #49

Comments

@fredrikekre
Copy link
Member

Not sure what I am missing:

julia> using GeoIP, Sockets

julia> a = ip"1.2.3.4";

julia> geolocate(a)
[ Info: Geolocation data not in memory. Loading...
┌ Error: Geolocation data cannot be read. Data directory may be corrupt...
└ @ GeoIP ~/.julia/packages/GeoIP/ct0la/src/data.jl:96
ERROR: UndefVarError: blocks not defined

Browsing the source I found the update function:

julia> GeoIP.update()
┌ Error: Failed to download checksum file from MaxMind, check network connectivity
└ @ GeoIP ~/.julia/packages/GeoIP/ct0la/src/data.jl:37
ERROR: MethodError: no method matching dldata(::Nothing)
@fredrikekre
Copy link
Member Author

I guess the URLs are wrong?

$ curl -LI http://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip.md5
curl: (6) Could not resolve host: geolite.maxmind.com

@Arkoniak
Copy link
Collaborator

Yes, this method should be removed.

In 2019 IIRC, MaxMind removed direct access to its databases. Now you have to make an account and you should use their own downloaders to get the data (or you can download it via the web, after the login). It can be solved on Julia's side, but I do not think it's worth it.

Another alternative is https://db-ip.com/db/ but it also requires account.

So, my current opinion is that data files should be downloaded separately, and GeoIP.jl should only provide a convenient wrapper to work with them. We can't even distribute these files with the repository, since they have special non-mit license.

@fredrikekre
Copy link
Member Author

I see, perhaps that should be put in the readme.

@fredrikekre
Copy link
Member Author

Closing in favor of #48.

@Arkoniak Arkoniak linked a pull request Apr 28, 2021 that will close this issue
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 a pull request may close this issue.

2 participants