Closed sezal closed 8 years ago
Thanks. We just added the field to this database. It indeed should never be 0
. We hope to have this fixed in the next build.
Thanks again for reporting this. We have released an updated database on http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz which should fix the issue you raised. Does the updated database solve the issue?
confirmed. It's fixed now.
Code below with database from http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz fails for last couple days. The problem with accuracy_radius which is 0 for some reason.
Since accuracy_radius attribute of GeoIP2::Record::Location declared as 'PositiveInt' I would try to pre-validate data returned by reader. Zero accuracy_radius means n/a and probably it's better not to pass it to GeoIP2::Record::Location::new at all rather than changing attribute type to 'NonNegInt'
Dies with error
GeoIP2: 2.003001 MaxMind::DB::Reader::XS: 1.000003