Alano-i / Plugins

Movie Robot 插件,以及一些企业微信微通知脚本。
MIT License
128 stars 29 forks source link

推送通知报错 #2

Closed EndlessJY closed 1 year ago

EndlessJY commented 1 year ago

版本: tautulli:v2.10.5 (2022-11-07) wxapp_nofity.py:最新版

相关操作: 卸载重装tautulli容器 开启/关闭 更新日志谷歌翻译

错误信息: 2022-12-01 16:13:01 - DEBUG :: Thread-15 (run) : Tautulli ActivityHandler :: Session 9 started by user 178524650 (Fi****m) with ratingKey 236005 (点燃我,温暖你 - 点燃我,温暖你(2022)). 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Notifiers enabled for notify_action 'on_play'. 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Checking global notification conditions. 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Global notification conditions evaluated to 'True'. 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Checking custom notification conditions for notifier_id 6. 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: {1} username | is not | 'Te****t' or 'En****Y' > 'Fi****m' > True 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Condition logic [blank]: {1} > True 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Custom conditions evaluated to 'True'. Conditions: [True]. 2022-12-01 16:13:01 - INFO :: Thread-2 (process_queue) : Tautulli NotificationHandler :: Preparing notification for notifier_id 6. 2022-12-01 16:13:01 - DEBUG :: Thread-2 (process_queue) : Tautulli Notifiers :: Trying to run notify script: /config/script/wxapp_nofity.py, arguments: ['/library/metadata/235985/art/1668925874', 'https://www.themoviedb.org/tv/134331', '▶️点燃我,温暖你 S01·E19', '3526', '0:0:0', '60', '...', 'Plex · Hot TV · 4k · bitrate! · SDR · 49分钟', '@Fi****m ⤷ Direct Play ⤷ Original · SDR', 'progress! 60%', '播放时间:2022-12-01 周4 16:13', '观看进度:00:29(60%) 剩余20分钟', '单集标题:点燃我,温暖你(2022)', '文件大小:1.20 GB', '播放设备:HKAI · Plex for Windows', '设备地址:...whereareyou!'], action: play 2022-12-01 16:13:02 - DEBUG :: Thread-2 (process_queue) : Tautulli Notifiers :: Full script is: ['/usr/bin/python3', '/config/script/wxapp_nofity.py', '/library/metadata/235985/art/1668925874', 'https://www.themoviedb.org/tv/134331', '▶️点燃我,温暖你 S01·E19', '3526', '0:0:0', '60', '...', 'Plex · Hot TV · 4k · bitrate! · SDR · 49分钟', '@Fi****m ⤷ Direct Play ⤷ Original · SDR', 'progress! 60%', '播放时间:2022-12-01 周4 16:13', '观看进度:00:29(60%) 剩余20分钟', '单集标题:点燃我,温暖你(2022)', '文件大小:1.20 GB', '播放设备:HKAI · Plex for Windows', '设备地址:...whereareyou!'] 2022-12-01 16:13:02 - DEBUG :: Thread-2 (process_queue) : Tautulli Notifiers :: Executing script in a new thread. 2022-12-01 16:13:04 - DEBUG :: Thread-18 (run_script) : Tautulli Notifiers :: Subprocess returned with status code 1. **``` 2022-12-01 16:13:04 - ERROR :: Thread-18 (run_script) : Tautulli Notifiers :: Script error: Traceback (most recent call last): File "/app/tautulli/lib/simplejson/scanner.py", line 37, in _scan_once nextchar = string[idx] IndexError: string index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/tautulli/lib/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/app/tautulli/lib/simplejson/init.py", line 525, in loads return _default_decoder.decode(s) File "/app/tautulli/lib/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/app/tautulli/lib/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) File "/app/tautulli/lib/simplejson/scanner.py", line 79, in scan_once return _scan_once(string, idx) File "/app/tautulli/lib/simplejson/scanner.py", line 39, in _scan_once raise JSONDecodeError(errmsg, string, idx) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/script/wxapp_nofity.py", line 581, in resp = handler.push(config[service], args) File "/config/script/wxapp_nofity.py", line 502, in push where = self.get_ip_info(ip_address, appcode) File "/config/script/wxapp_nofity.py", line 185, in get_ip_info if response.json()['code'] == 200: File "/app/tautulli/lib/requests/models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] : 0 2022-12-01 16:13:04 - DEBUG :: Thread-18 (run_script) : Tautulli Notifiers :: Script returned: reading config from: /config/script/config.yml



  启用企业微信发送通知,下面开始处理

  未设置微信白名单代理,使用官方 api 地址

  Tautulli 传递过来的原始消息如下:
  ————————————————————————————————————————————————

  ['/library/metadata/235985/art/1668925874', 'https://www.themoviedb.org/tv/134331', '▶️点燃我,温暖你 S01·E19', '3526', '0:0:0', '60', '***.***.***.***', 'Plex · Hot TV · 4k · bitrate! · SDR · 49分钟', '@Fi********m ⤷ Direct Play ⤷ Original · SDR', 'progress! 60%', '播放时间:2022-12-01  周4  16:13', '观看进度:00:29(60%)  剩余20分钟', '单集标题:点燃我,温暖你(2022)', '文件大小:1.20 GB', '播放设备:HKAI · Plex for Windows', '设备地址:***.***.***.***whereareyou!']

  ————————————————————————————————————————————————

  参数传递数量正确,开始处理通知数据!

  已配置 appcode,处理IP归属地!

2022-12-01 16:13:04 - INFO :: Thread-18 (run_script) : Tautulli Notifiers :: Script notification sent.
Alano-i commented 1 year ago

抱歉,一直没注意到,你看看现在还有这个问题吗?通知代码的模板也重新替换一下。