linearize.py AttributeError: 'dict' object has no attribute 'decode' #3112

issue wtogami opened this issue on October 19, 2013
  1. wtogami commented at 6:47 AM on October 19, 2013: contributor

    Fedora 18 python-2.7.3-13.fc18.x86_64

    Traceback (most recent call last): File "/home/btc08/bin/linearize.py", line 127, in <module> get_blocks(settings) File "/home/btc08/bin/linearize.py", line 79, in get_blocks data = getblock(rpc, settings, height) File "/home/btc08/bin/linearize.py", line 68, in getblock data = hexdata.decode('hex') AttributeError: 'dict' object has no attribute 'decode'

  2. weex commented at 6:22 AM on October 26, 2013: none

    It appears that this script is expecting getblock to return the block data as a hex string. Is this supposed to work with a specially compiled bitcoind?

  3. gmaxwell commented at 7:28 AM on October 26, 2013: contributor

    @weex it returns the block as a hex string, if you call it in non-verbose mode, which the script appears to do (I just glanced at it)

    Also, I just tested it:

    $ python ./linearize.py a.cfg Wrote block 0 Wrote block 1000 Wrote block 2000 Wrote block 3000

  4. wtogami commented at 7:31 AM on October 26, 2013: contributor

    Closing. It is meant for 0.9.

  5. wtogami closed this on Oct 26, 2013

  6. nfceek commented at 7:59 PM on June 16, 2014: none

    I'm trying to adapt this to an alt coin (Sexcoin) but keep getting this error; File "./linearize.py", line 130, in <module> get_blocks(settings) File "./linearize.py", line 79, in get_blocks data = getblock(rpc, settings, height) File "./linearize.py", line 68, in getblock data = hexdata.decode('hex') AttributeError: 'dict' object has no attribute 'decode'

    my cfg file and conf file for the coin are sync'd and not a connection issue, I've changed the netmagic to the first for octets of the coin:fbc0b6db but I'm out of ideas on why this wouldn't work.

  7. Bushstar referenced this in commit 2ca2138fc8 on Apr 8, 2020
  8. MarcoFalke locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me