【发布时间】:2020-09-03 21:11:50
【问题描述】:
在this locationthis location使用 python2.7 中的 s2sphere 库时出现以下错误。
ljust() argument 2 must be char, not unicode
@classmethod
def from_token(cls, token):
"""Creates a CellId from a hex encoded cell id string, called a token.
:param str token:
A hex representation of the cell id. If the input is shorter than
16 characters, zeros are appended on the right.
"""
return cls(int(token.ljust(16, '0'), 16))
该文件似乎是 ASCII 编码的,所以我正在为为什么会看到这个而摸不着头脑
【问题讨论】:
标签: python python-2.7 python-unicode s2