Open jingwangnet opened 6 years ago
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'
pip 安装的 img2html-0.0.7
decode那一行和它的判断条件一起删掉,next()方法都改为next(),xrange()方法都改为range()