Overflow error multichain explorer

0 votes
Hi! I have an overflow error just like the one that was posted before,

Traceback (most recent call last):
  File "Mce/DataStore.py", line 2861, in catch_up
    if not store.catch_up_rpc(dircfg):
  File "Mce/DataStore.py", line 3093, in catch_up_rpc
    store.import_block(block, chain = chain)
  File "Mce/DataStore.py", line 1193, in import_block
    tx['tx_id'] = store.import_and_commit_tx(tx, pos == 0, chain)
  File "Mce/DataStore.py", line 2183, in import_and_commit_tx
    tx_id = store.import_tx(tx, is_coinbase, chain)
  File "Mce/DataStore.py", line 2164, in import_tx
    (quantity, pubkey_id, prefix))
  File "Mce/DataStore.py", line 262, in sql
    store._sql.sql(stmt, params)
  File "Mce/SqlAbstraction.py", line 426, in sql
    sql._execute(cached, params)
  File "Mce/SqlAbstraction.py", line 407, in _execute
    sql.cursor().execute(stmt, params)

OverflowError: Python int too large to convert to SQLite INTEGER

the difference in this case os that I didn't issue a big amount of coins, just 1000. So where this big numbers are coming from? and how can I modify the code so they get accepted. Thanks
asked Feb 24, 2017 by anonymous
Is this reproducible?  How big it the Python int i.e. you specify 1000 coins but that is display format, what is it in native coins, e.g. in bitcoin there would be 8 decimal places, so 1000.00000000 would be 100000000000.  Can you add a debug statement e.g. `print ">>> quantity", quantity` somewhere near  line 2164, in import_tx.  Thanks.

1 Answer

0 votes
I don't have the explorer on this computer, but can put a try exception wrapper on the execute statement then print out the name:values used in the bind variables ?

If the number is in fact legitimate and larger than the table you will have to alter the datatype in the table.

I haven't played with sqlite much, you might have to create a new column, populate from the old, drop the old and rename the new.   My first inclination would be to make a copy of the database and try and alter column.
answered Feb 26, 2017 by Jim Schmidt
...