我在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,2019年12月19日,00:42:30)[MSC v.1916 64位(AMD64)]
  sys.version_info(major = 3,minor = 7,micro = 6,releaselevel ='final',serial = 0)
  
  追溯(最近一次通话):文件“ C:\ Users \ xxx \ AppData \ Local \ Programs \ Python \ Python37 \ lib \ encodings \ idna.py”,行167,编码时出现UnicodeError(“ label too long”)
  UnicodeError:标签过长


Repl.it上,所有操作均正常进行。

调试idna.py显示,第3个标签是引发异常的标签,但是我一直在努力理解为什么我在本地安装中遇到此问题。

python - Blockcypher-python UnicodeError(“标签过长”)-LMLPHP

最佳答案

最新版本(1.0.80)中的A fix for Windows has been made

关于python - Blockcypher-python UnicodeError(“标签过长”),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59576911/

10-09 05:30