Closed fisher85 closed 3 years ago
This makes sense. We should accept os.PathLike
and then use os.fspath
to convert it when necessary.
This is fixed by https://github.com/maxmind/MaxMind-DB-Reader-python/pull/85.
The fix for this has been released.
I try to construct
Reader
withpathlib.Path
object:And I get the error:
The solution to the problem is to use
str(db_path)
:reader = Reader(str(db_path), locales=['en'])
However, it would be great if the GeoIP2-python package would support the
pathlib.Path
objects.