makeseeds.py error line 134 #7393

issue Zwilla opened this issue on January 22, 2016
  1. Zwilla commented at 12:35 PM on January 22, 2016: none

    curl -s http://bitcoin.sipa.be/seeds.txt | ./makeseeds.py

    File "./makeseeds.py", line 134 result.extend(ips_onion) ^ IndentationError: unexpected indent curl: (23) Failed writing body (1444 != 8688)

    file: makeseeds.py 132: # Add back non-IPv4 133: result.extend(ips_ipv6) 134: result.extend(ips_onion) 135: return result

    Any idea?

  2. laanwj added the label Dev Scripts on Jan 22, 2016
  3. laanwj commented at 12:43 PM on January 22, 2016: member

    Can't reproduce this on master:

    $ curl -s http://bitcoin.sipa.be/seeds.txt > a.txt
    $ ./makeseeds.py < a.txt > b.txt
    $ wc b.txt
      941   941 23723 b.txt
    

    Perhaps a python2/3 conflict? Can you try explicitly using python 2 eg

    $ curl -s http://bitcoin.sipa.be/seeds.txt | python2 ./makeseeds.py
    
  4. jonasschnelli commented at 12:51 PM on January 22, 2016: contributor

    Works here:

    $ curl -s http://bitcoin.sipa.be/seeds.txt | ./seeds/makeseeds.py 
    5.2.145.201:8333
    5.22.142.214:8333
    ---------snip---------
    

    You error on line 134 could indicate that you are parsing a 404/403 or similar page. Maybe you have a proxy in between. Do you get the seeders db file with just calling curl -s http://bitcoin.sipa.be/seeds.txt?

  5. Zwilla commented at 12:55 PM on January 22, 2016: none

    with curl -s http://bitcoin.sipa.be/seeds.txt > a.txt I get the a.txt with vi I can see that the content is valid, but with ./makeseeds.py < a.txt > b.txt I got the same error also with python2 makeseeds.py < a.txt > b.txt

    Error: File "makeseeds.py", line 134 result.extend(ips_onion) ^ IndentationError: unexpected indent

  6. laanwj commented at 1:01 PM on January 22, 2016: member

    What version of python?

    Edit: can't find anything strange with the indentation of line 134, it all uses spaces as it should, so I don't understand what python would trip on this.

  7. jonasschnelli commented at 1:02 PM on January 22, 2016: contributor

    @Zwilla: are you sure you have a unchanged version of https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/makeseeds.py?

    It look like you are missing (or should remove) a \t at line 134.

  8. Zwilla commented at 1:21 PM on January 22, 2016: none

    I checked my makeseeds.py:

    .# Add back non-IPv4 .result.extend(ips_ipv6) ....result.extend(ips_onion) ....return result

    This is c+p from source, the different is only the empty space (makeseeds.py) ....# Add back non-IPv4 ....result.extend(ips_ipv6) ....result.extend(ips_onion) ....return result

    (.....) every point means an space Now it is working!

    only the empty spaces in front of the line 132 and 133 fixed the problem.

    I don not know what I will do now. Cackling or jumping from a skyscraper. Ok I do no1 at first and then no2

    thx a lot guys, but I cant believe that empty spaces will fix the problem.

    thx an have an nice weekend

  9. jonasschnelli closed this on Jan 22, 2016

  10. MarcoFalke locked this on Sep 8, 2021

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 12:15 UTC

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