Closed stepanov1997 closed 3 months ago
Project has update. u can update by
pip install -U git+https://github.com/VimT/MaxMind-DB-Writer-python
And try this
from mmdb_writer import MMDBWriter
writer = MMDBWriter(int_type='i32')
Just to let you know: The merge request requires python 3.10 to work as the usage of Union[float | Decimal]
requires it.
def init(self, value: Union[float | Decimal]): TypeError: unsupported operand type(s) for |: 'type' and 'type'
Maybe it makes sense to point this out somewhere in the Readme and update the pyproject.toml.
@timmey09 Thanks for finding the bug. The correct usage of typing.Union
should be Union[float, Decimal]
I have written to an MMDB file in Python:
I have used the file in a Java application and encountered an error while deserializing data:
When I used the integer value 15169, I received a similar message: 'Cannot cast java.lang.Integer to java.lang.Long'.
How can I mark a field to be parsed as long?