blockcypher / blockcypher-python

Python library for the BlockCypher web services

Home Page:https://www.blockcypher.com/dev/bitcoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"UnicodeError: label too long"

Davide3i opened this issue · comments

Launching a simple
get_address_overview('1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW'))
triggers this exception. Has anyone encoutered this issue yet? I'm using Python 3.7/3.8.

File "C:\Users\xxx\AppData\Local\Programs\Python\Python37\lib\encodings\idna.py", line 167, in encode
raise UnicodeError("label too long")
UnicodeError: label too long

encountered this too, has too do with the idna encoding rules (address is too long for idna encoding)... any idea how to solve that? makes blockcypher api unusable

Taking a look at this now.

I found, that everything works if the url you are creating does contain slashes (/) instead of double-backslashes (\).

I don't see any error on Linux and macOS.
Now trying on Win10.

Can reproduce on Windows. Unfortunately it seems like a Python issue which is still unresolved: https://bugs.python.org/issue32958

Okay nevermind found the issue.

Perfect, thank you.

This fix hasn't been pulled to PyPI yet.