Blockcypher-python UnicodeError(“标签太长”)

huangapple go评论86阅读模式
英文:

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个标签是引发异常的原因,但我很难理解为什么在我的本地安装中会出现这个问题。

Blockcypher-python UnicodeError(“标签太长”)

英文:

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.

Blockcypher-python UnicodeError(“标签太长”)

答案1

得分: 0

在最新版本(1.0.80)中已经对Windows进行了修复。

英文:

A fix for Windows has been made in the last release (1.0.80).

huangapple
  • 本文由 发表于 2020年1月3日 18:27:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/59576911.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定