python-db icon indicating copy to clipboard operation
python-db copied to clipboard

[BUG] Error opening database file (dbs/country_asn.mmdb). Is this a valid MaxMind DB file?

Open NannoSilver opened this issue 1 year ago • 0 comments

I am running this library, version 0.0.4 and it is set to auto-update the database file, downloading a new .mmdb once a week.

client = ipinfo_db.Client(token, path='dbs/country_asn.mmdb', replace=true_once_a_week())

It performs the database updating once a week as set, however there is a bug. While this updating is on-going, that is, the new country_asn.mmdb is downloading, and frequently that takes over one minute, any try to extract the IP info from the database fails with this error message: Error opening database file (dbs/country_asn.mmdb). Is this a valid MaxMind DB file?

After the updating is finished, then it works normally again.

NannoSilver avatar May 06 '24 12:05 NannoSilver