opq-osc / OPQ-SetuBot

基于botoy和OPQBot的色图机器人
MIT License
212 stars 34 forks source link

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 53-56: ordinal not in range(256) #55

Closed test-black closed 2 years ago

test-black commented 2 years ago

snipaste_20220108_112354

yuban10703 commented 2 years ago

阿哲,怎么出现的?

test-black commented 2 years ago

重新克隆仓库填写配置信息,python3 bot.py,boom

yuban10703 commented 2 years ago

什么系统

yuban10703 commented 2 years ago

我更新所有库的版本到最新后不能复现呀.... pip3 install -r requirements.txt --upgrade

test-black commented 2 years ago

什么系统

Ubuntu 18.04

test-black commented 2 years ago

我更新所有库的版本到最新后不能复现呀.... pip3 install -r requirements.txt --upgrade

snipaste_20220108_114449

test-black commented 2 years ago

应该是这里导入字体报错了 plugins/bot_Genshin_gacha/genshin.py

snipaste_20220108_114651

yuban10703 commented 2 years ago

你把对应文件和代码里的文件名改成英文试试

test-black commented 2 years ago

我换台机器试试,可能是终端控制台的编码有问题

test-black commented 2 years ago

树莓派上的版本通过 git pull 的形式更新没报错,但是新开的阿里云轻量(ubuntu 18.04)重新走一遍流程就报错了

yuban10703 commented 2 years ago

换Ubuntu20.04试试....

test-black commented 2 years ago

依然报错,cmder 和 mobaxterm 终端都试过了

yuban10703 commented 2 years ago

emm,试试装个中文字体..

test-black commented 2 years ago

装了,寄

yuban10703 commented 2 years ago

寄了,找个脚本重装一个Ubuntu2004吧

test-black commented 2 years ago

已经是20.04了

test-black commented 2 years ago

用的萌咖那个dd脚本

yuban10703 commented 2 years ago

阿哲,那可能没救了...,试试Debian

test-black commented 2 years ago

代码确定是UTF-8吗,我刚在本地新建个含中文字符的py文件,GBK编码后丢git上,传回来也是这种乱码

yuban10703 commented 2 years ago

image

是utf-8呀...

test-black commented 2 years ago

emm,试试装个中文字体..

https://blog.csdn.net/weixin_39278265/article/details/119343204

test-black commented 2 years ago

ubuntu 20.04 的问题