英文:
Blockcypher-python UnicodeError("label too long")
问题
我在使用Blockcypher for Python时遇到了一个麻烦的问题。
以下是一个简单的代码片段:
import sys
from blockcypher import get_address_overview
print(sys.version)
print(sys.version_info)
print(get_address_overview('1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW'))
在我的本地安装中(我在使用PyCharm),它引发了以下异常:
> 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
> sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)
>
> Traceback (most recent call last): 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
而在Repl.it上一切正常运行。
调试idna.py显示第3个标签是引发异常的原因,但我很难理解为什么在我的本地安装中会出现这个问题。
英文:
I'm having a nasty issue with Blockcypher for Python.
A simple snippet code
import sys
from blockcypher import get_address_overview
print(sys.version)
print(sys.version_info)
print(get_address_overview('1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW'))
is raising this exception on my local installation (I'm using PyCharm)
> 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
> sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)
>
> Traceback (most recent call last): 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
while on Repl.it everything is working flawlessly.
Debugging idna.py showed that the 3rd label is the one raising the exception, but I'm struggling to understand why I'm having this issue on my local installation.
答案1
得分: 0
在最新版本(1.0.80)中已经对Windows进行了修复。
英文:
A fix for Windows has been made in the last release (1.0.80).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论