Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverflowError: long too big to convert #104

Open
ghost opened this issue May 21, 2014 · 4 comments
Open

OverflowError: long too big to convert #104

ghost opened this issue May 21, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented May 21, 2014

Hi, I'm operating Citizencoin block explorer, but I got stuck on block 8628. This is what I get in console:

Exception at 7872363
Failed to catch up {'blkfile_offset': 7871528, 'blkfile_number': 1, 'chain_id':
15, 'loader': None, 'conf': None, 'dirname': u'/root/.citizencoin/', 'id': 1}
Traceback (most recent call last):
File "Abe/DataStore.py", line 2507, in catch_up
store.catch_up_dir(dircfg)
File "Abe/DataStore.py", line 2773, in catch_up_dir
store.import_blkdat(dircfg, ds, blkfile['name'])
File "Abe/DataStore.py", line 2905, in import_blkdat
store.import_block(b, chain = chain)
File "Abe/DataStore.py", line 1133, in import_block
len(b['transactions']), b['search_block_id']))
File "Abe/DataStore.py", line 249, in sql
store._sql.sql(stmt, params)
File "Abe/SqlAbstraction.py", line 457, in sql
sql._execute(cached, params)
File "Abe/SqlAbstraction.py", line 438, in _execute
sql.cursor().execute(stmt, params)
OverflowError: long too big to convert

@ghost
Copy link
Author

ghost commented May 22, 2014

additional information:

EXEC: INSERT INTO block (
block_id, block_hash, block_version, block_hashMerkleRoot,
block_nTime, block_nBits, block_nNonce, block_height,
prev_block_id, block_chain_work, block_value_in,
block_value_out, block_total_satoshis,
block_total_seconds, block_total_ss, block_num_tx,
search_block_id
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
) (10111, <read-only buffer for 0x2c1fcd8, size -1, offset 0 at 0x2c22b30>, 4, <read-only buffer for 0x2c1fc00, size -1, offset 0 at 0
x2c22b70>, 1400704868, 471394318, 155081, 8629, 10110, <read-only buffer for 0x2c1dda0, size -1, offset 0 at 0x2c22bb0>, 7530000000, 12290000000, 9175
2048000000, 1722002, 9224930995138000000L, 2, 7896)
EXCEPTION: long too big to convert
Exception at 7872363

@ghost
Copy link
Author

ghost commented May 28, 2014

This is what happens when I try to make new database

File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/bitcoin-abe/Abe/abe.py", line 2026, in
sys.exit(main(sys.argv[1:]))
File "/root/bitcoin-abe/Abe/abe.py", line 2020, in main
store = make_store(args)
File "/root/bitcoin-abe/Abe/abe.py", line 156, in make_store
store = DataStore.new(args)
File "Abe/DataStore.py", line 3268, in new
return DataStore(args)
File "Abe/DataStore.py", line 220, in init
store.maybe_import_binary_tx(chain_name, str(hex_tx).decode('hex'))
File "Abe/DataStore.py", line 1881, in maybe_import_binary_tx
tx = chain.parse_transaction(binary_tx)
File "Abe/Chain.py", line 171, in parse_transaction
return chain.ds_parse_transaction(util.str_to_ds(binary_tx))
File "Abe/Chain.py", line 87, in ds_parse_transaction
return deserialize.parse_Transaction(ds)
File "Abe/deserialize.py", line 90, in parse_Transaction
d['txIn'].append(parse_TxIn(vds))
File "Abe/deserialize.py", line 46, in parse_TxIn
d['sequence'] = vds.read_uint32()
File "Abe/BCDataStream.py", line 71, in read_uint32
def read_uint32 (self): return self._read_num('<I')
File "Abe/BCDataStream.py", line 110, in _read_num
(i,) = struct.unpack_from(format, self.input, self.read_cursor)
struct.error: unpack_from requires a buffer of at least 4 bytes

@zikomoto
Copy link

check the ppcoin branch
#4

@ghost
Copy link
Author

ghost commented May 28, 2014

Thanks, fixed :)

I needed to replace this

if has_nTime:
    d['nTime'] = vds.read_uint32()

with this

 d['nTime'] = vds.read_uint32()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant