Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

UnicodeError: encoding with 'idna' codec failed (UnicodeError: label too long) after $ counterparty-client getinfo error. #61

Open
TOMOAKI12345 opened this issue Aug 19, 2015 · 5 comments

Comments

@TOMOAKI12345
Copy link

$ counterparty-client getinfo
[INFO] Running v1.1.1 of counterparty-client.
Unhandled Exception
Traceback (most recent call last):
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/bin/../lib/python3.4/encodings/idna.py", line 167, in encode
raise UnicodeError("label too long")
UnicodeError: label too long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/bin/counterparty-client", line 9, in
load_entry_point('counterparty-cli==1.1.1', 'console_scripts', 'counterparty-client')()
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/counterpartycli/init.py", line 12, in client_main
client.main()
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/counterpartycli/client.py", line 257, in main
view = console.get_view(args.action, args)
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/counterpartycli/console.py", line 16, in get_view
return util.api('get_running_info')
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/counterpartycli/util.py", line 92, in api
return rpc(config.COUNTERPARTY_RPC, method, params=params, ssl_verify=config.COUNTERPARTY_RPC_SSL_VERIFY)
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/counterpartycli/util.py", line 67, in rpc
response = rpc_session.post(url, data=json.dumps(payload), headers=headers, verify=ssl_verify, timeout=config.REQUESTS_TIMEOUT)
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/lib/python3.4/site-packages/requests/sessions.py", line 508, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/lib/python3.4/site-packages/requests/sessions.py", line 456, in request
prep.url, proxies, stream, verify, cert
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/lib/python3.4/site-packages/requests/sessions.py", line 614, in merge_environment_settings
env_proxies = get_environ_proxies(url) or {}
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/lib/python3.4/site-packages/requests/utils.py", line 534, in get_environ_proxies
if should_bypass_proxies(url):
File "/Users/tomoaki/Documents/workspace_py/counterparty-cli/lib/python3.4/site-packages/requests/utils.py", line 523, in should_bypass_proxies
bypass = proxy_bypass(netloc)
File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 2441, in proxy_bypass
return proxy_bypass_macosx_sysconf(host)
File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 2425, in proxy_bypass_macosx_sysconf
return _proxy_bypass_macosx_sysconf(host, proxy_settings)
File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 2398, in _proxy_bypass_macosx_sysconf
hostIP = socket.gethostbyname(hostonly)
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label too long)

@TOMOAKI12345
Copy link
Author

after client.conf, server.conf finished, and run the counterpatry-server start, but the error happened

@unsystemizer
Copy link
Contributor

Are you using a zenkaku hostname?
Try alphabet and short length.

Also this is a Python bug, I think.

@TOMOAKI12345
Copy link
Author

I'm not using zenkaku hostname. maybe my counterparty-server is late from the current block can be the reason. About fast-installation method development is stopped or in other way do you know ?
this issue,.https://github.com/CounterpartyXCP/counterparty-lib/pull/409

@unsystemizer
Copy link
Contributor

@TOMOAKI12345 check ArchiveTeam/wpull#82, it's a different project that had the same error. And it was closed there because the issue is upstream (Python): http://bugs.python.org/issue21103.
Maybe you can ask in http://bugs.python.org/issue21103 if they plan to solve it soon.
Edit: in that particular issue, the problem was caused by (link: http://www.fileformat.info/info/unicode/char/2026/index.htm).
In any case, if you're using a non-ASCII character maybe you can modify the hostname to ASCII and recheck.
hostIP = socket.gethostbyname(hostonly) - what's the server hostname?

@unsystemizer
Copy link
Contributor

@TOMOAKI12345 yes, the kickstart action does not work, I created an issue for that and will submit a pull request to remove it.
Currently, if you run counterparty-client getinfo you can see if your client has caught up to eliminate any doubt. I think the maximum allowed difference is 1 (because it is necessary, each time block height is incremented, the difference will appear until the block is processed).

{
    "bitcoin_block_count": 1084542, <============== BITCOIN
    "db_caught_up": true,
    "last_block": {
        "block_hash": "0000000000001275e1e1af38c8df6648945cec3abbf617735450a631ffe88102",
        "block_index": 1084541, <============== COUNTERPARTY
        "block_time": 1484740374,
        "difficulty": 262144,
        "ledger_hash": "46f6b5e3dec29c2e6f2b8fa532341de3e6318e02f5f3bcc77640dee2e8b7da5c",
        "messages_hash": "30134ae1525b3d9fcac3f8dccc53892141f184d2561bc96d8f6a8dfd9b9c27e4",
        "previous_block_hash": "0000000000003dc1786a94aa32484dbeb5264ba0fbb8a5b91b849f7765ae6751",
        "txlist_hash": "fd3f46be871a0066806ff599f4fafca2b3c1e16b668e530baad896da1682ebfc"
    },
    "last_message_index": 32311,
    "running_testcoin": false,
    "running_testnet": true,
    "version_major": 9,
    "version_minor": 55,
    "version_revision": 1
}

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

No branches or pull requests

2 participants