0

I am using mongoDB for a side-project. Trying to insert at document using pymongo I get this error:

'OverflowError: MongoDB can only handle up to 8-byte ints'

The issue is that my document has some long ints (“value”: 23051923387397964883670) and some small with decimals (“value”: 0.4608369174340644).

Does anybody know how to deal with this?

Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
  • Similar question maybe some ideas suitable: https://stackoverflow.com/questions/55280033/how-to-handle-long-ints-in-json-while-inserting-into-mongo – R2D2 May 26 '22 at 14:07
  • The "value" data, by default, stores in MongoDB as a `double`. In Python its equivalent is a `float`. – prasad_ May 27 '22 at 06:41

0 Answers0