焦南方 发表于 2023-5-17 07:53:41

【待反馈】UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in po...

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:免费版 7.8.0
系统版本:Windows Server 2019 Datacenter (build 17763) x64 (Py3.8.6)
问题描述:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 1: invalid start byte

相关截图(日志、错误):UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 1: invalid start byte
REQUEST_DATE: 2023-05-17 07:52:39 PAN_VERSION: 7.8.0OS_VERSION: Windows Server 2019 Datacenter (build 17763) x64 (Py3.8.6) REMOTE_ADDR: 39.184.35.74 REQUEST_URI: POST /database/redis/get_db_keylist?REQUEST_FORM: {'data': '{"db_type":0,"db_idx":0,"limit":20}'}USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36 SE 2.X MetaSr 1.0Traceback (most recent call last):File "E:\BtSoft\panel\BTPanel\__init__.py", line 1534, in publicObject    return run_exec().run(toObject, defs, get)File "E:\BtSoft\panel\BTPanel\__init__.py", line 1731, in run    result = eval(fun)File "", line 1, in   File "E:\BtSoft\panel/class\panelDatabaseController.py", line 79, in model    result = run_object(pdata)File "E:\BtSoft\panel/class/databaseModel/redisModel.py", line 275, in get_db_keylist    item['val'] = redis_obj.get(key).decode()UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 1: invalid start byte

谢花郎 发表于 2023-5-17 09:53:34

您好,如您的Redis内的key之中存在一个中文编码或者其他字符导致无法读取,所以返回了编码错误问题。
如当前以影响到使用,您可以尝试使用其他工具先连接到Redis进行查看,后续这边看下针对这类情况下做出优化
页: [1]
查看完整版本: 【待反馈】UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in po...