img2html icon indicating copy to clipboard operation
img2html copied to clipboard

Python3.54rc1 报错

Open jingwangnet opened this issue 7 years ago • 2 comments

jingwang@jingwang-pc:~$ sudo img2html -s 25 -c '静' -t 'jing.wang' -i ~/Pictures/Wallpapers/174fea21dd2d2f0d99a8d9c5de412757.jpg  -o test.html
Traceback (most recent call last):
  File "/usr/local/bin/img2html", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/img2html/__init__.py", line 35, in main
    font_family=args.font,
  File "/usr/local/lib/python3.5/dist-packages/img2html/converter.py", line 73, in __init__
    char = char.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

jingwangnet avatar May 19 '18 13:05 jingwangnet

pip 安装的 img2html-0.0.7

jingwangnet avatar May 19 '18 13:05 jingwangnet

decode那一行和它的判断条件一起删掉,next()方法都改为__next__(),xrange()方法都改为range()

DawN1ng avatar Jun 26 '18 14:06 DawN1ng