ColdThunder11 / pcr-rank

A auto-update rank list module for hoshino
17 stars 4 forks source link

使用sstap代理时rank表缓存更新报错 #8

Closed SonderXiaoming closed 2 years ago

SonderXiaoming commented 2 years ago

报错代码如下 [2022-03-26 07:54:01,993 pcr-rank] INFO: 正在更新Rank表缓存 [2022-03-26 07:54:03,300 pcr-rank] ERROR: <class 'json.decoder.JSONDecodeError'> occured when update_rank_cache handling message 1808773184. [2022-03-26 07:54:03,303 pcr-rank] ERROR: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\service.py", line 224, in wrapper return await func(bot, event) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 278, in update_rank_cache await update_cache() File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 94, in update_cache await update_rank_pic_cache(force_update) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 71, in update_rank_pic_cache rank_config = json.load(fp) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json__init.py", line 293, in load return loads(fp.read(), File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 另附上cn.json,其中出现一处错误(方便上传改成了txt) cn.txt

ColdThunder11 commented 2 years ago

报错代码如下 [2022-03-26 07:54:01,993 pcr-rank] INFO: 正在更新Rank表缓存 [2022-03-26 07:54:03,300 pcr-rank] ERROR: <class 'json.decoder.JSONDecodeError'> occured when update_rank_cache handling message 1808773184. [2022-03-26 07:54:03,303 pcr-rank] ERROR: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\service.py", line 224, in wrapper return await func(bot, event) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 278, in update_rank_cache await update_cache() File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 94, in update_cache await update_rank_pic_cache(force_update) File "C:\Users\Administrator\Desktop\huannai\HoshinoBot\hoshino\modules\pcr-rank\rank.py", line 71, in update_rank_pic_cache rank_config = json.load(fp) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\jsoninit.py", line 293, in load return loads(fp.read(), File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\jsoninit.py", line 357, in loads return _default_decoder.decode(s) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 另附上cn.json,其中出现一处错误(方便上传改成了txt) cn.txt

可能是你用的ip不干净触发了cloudflare的安全防护,我已经把rank表资源的防护全关了,你重新试下