are you using the latest repos from
http://gitorious.org/libbitcoin/ ?
If so can you paste the error here (if different from above). It looks like you're using a libbitcoin from a few days ago but latest python bindings.
Updating to the newest git head for libbitcoin seems to have fixed the last error. I don't know how I ended up with versions that didn't match considering I literally installed the system fresh last night and checked out the projects one after the other, but w/e.
Weeee!
(env)[user@silo onion-coin]$ python -i
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bitcoin
>>> dir(bitcoin)
['_1', '_2', '_3', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_bitcoin', 'acceptor', 'address', 'address_to_short_hash', 'bdb_blockchain', 'bind', 'block', 'block_info', 'block_locator', 'block_locator_indices', 'block_reward', 'block_status', 'block_value', 'block_work', 'blockchain', 'bytes_from_pretty', 'channel', 'coin_price', 'coinbase_maturity', 'coinbase_script', 'data_chunk', 'decode_base58', 'elliptic_curve_key', 'encode_base58', 'error', 'error_code', 'exporter', 'generate_merkle_root', 'generate_ripemd_hash', 'generate_sha256_checksum', 'generate_sha256_hash', 'genesis_block', 'get_address', 'get_blocks', 'get_data', 'handshake', 'hash_block_header', 'hash_digest', 'hash_digest_from_pretty', 'hash_transaction', 'header', 'indices_list', 'input_point', 'inventory', 'inventory_list', 'inventory_type', 'inventory_vector', 'is_coinbase', 'magic_value', 'max_bits', 'max_money', 'max_target', 'network', 'network_address', 'network_address_list', 'null_hash', 'null_short_hash', 'opcode', 'opcode_to_string', 'operation', 'operation_stack', 'output_point', 'output_point_list', 'parse_script', 'payment_type', 'ping', 'previous_output_is_null', 'public_key_to_address', 'readjustment_interval', 'reward_interval', 'satoshi_exporter', 'save_script', 'script', 'setup_bdb_blockchain', 'short_hash', 'short_hash_from_pretty', 'short_hash_wrapper', 'sighash', 'string_to_opcode', 'target_spacing', 'target_timespan', 'total_output_value', 'transaction', 'transaction_input', 'transaction_input_list', 'transaction_list', 'transaction_output', 'transaction_output_list', 'verack', 'version']
So I'm trying to use your tutorials, but they aren't working for me. I'm not running bitcoind locally, so I think that might be why.
Both tutorial.py and first500.py give this:
$ python tutorial.py
s: version (112 bytes)
Bad header received.
For tutorial.py, I changed self.net.connect to my system running bitcoind and also I tried changing vers.address_you.ip.
For first500.py, I changed hs.connect to my system, but it also failed.
I am trying to build a lightweight tool for querying nodes to get their version. Right now, one of my systems has all of the tor hidden services added as nodes, but many of those services are offline and it takes forever trying to connect to all of them. I was hoping to use PyTorCtl and libbitcoin to map all of the addresses and then return versions for all of the nodes that are up. I could then drop this list of nodes that I know to be online and running current versions into my bitcoin.conf. From there it wouldn't be too much work to make it into a bot that updates the wiki page.
It seems to connect, but the handshake is failing.