环境:
宿主机:ubuntu 20.04
Docker Debian10 (buster)
python 3.8.7
原 requirements.txt 如下 ,其中 msgpack_python 最后更新日期为 2018年3月,对python3支持可能不是很好?在按照readme.md部署加载moduel时,所有jjc查询功能失效。报错如下面error.log部分。
谷歌后找到了一个issue,提示与 msgpack 有关,检查后在源码requirement.txt里找到相关设置。 我这边尝试了两个步骤,升级msgpack到1.0.4未能解决问题。卸载msgpack_python后,功能恢复正常,也没有错误日志了
msgpack_python==0.5.6
msgpack==1.0.2
nonebot==1.8.4
Pillow==9.0.1
pycryptodome==3.14.1
python_dateutil==2.8.2
requests==2.27.1
zhconv==1.4.3
error log如下:
[2022-06-13 00:16:31,827 竞技场推送] ERROR: <class 'TypeError'> occured when wrapper handling message -20*********5.
[2022-06-13 00:16:31,827 竞技场推送] ERROR: __init__() got an unexpected keyword argument 'strict_map_key'
Traceback (most recent call last):
File "/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message
await sf.func(bot, event)
File "/HoshinoBot/hoshino/modules/pcrjjc2/safeservice.py", line 25, in wrapper
return await func(*args, **kwargs)
File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 195, in on_query_arena
res = await query(id)
File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 125, in query
await client.login()
File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 205, in login
lres = await self.callapi('/tool/sdk_login', {
File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 146, in callapi
response = pcrclient.unpack(response)[0] if crypted else loads(response)
File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 130, in unpack
return unpackb(dec[:-dec[-1]],
File "/usr/local/lib/python3.8/site-packages/msgpack/fallback.py", line 118, in unpackb
unpacker = Unpacker(None, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'strict_map_key'