Ccccx159 / Emby_Notifier

Emby Notifier is a media notification service for Emby Server. It utilizes Emby Server's webhooks plugin to receive notifications when new media is added. It then formats and sends the information to your Telegram channel.
31 stars 3 forks source link

启动报错 log.logger.info(f"Telegram getChat successful. Chat title: [{res.json()['result']['title']}], type: {res.json()['result']['type']}") #5

Closed 907739769 closed 2 months ago

907739769 commented 2 months ago

[2024-06-09 21:35:13] [main.py|require_check|81] [ERROR] : 'title' Traceback (most recent call last): File "/usr/src/myapp/main.py", line 90, in require_check() File "/usr/src/myapp/main.py", line 82, in require_check raise e File "/usr/src/myapp/main.py", line 79, in require_check tgbot.get_chat() File "/usr/src/myapp/tgbot.py", line 76, in get_chat raise e File "/usr/src/myapp/tgbot.py", line 69, in get_chat log.logger.info(f"Telegram getChat successful. Chat title: [{res.json()['result']['title']}], type: {res.json()['result']['type']}")


KeyError: 'title'
907739769 commented 2 months ago

可选参数tvdb没填 报错 Welcome to Emby Notifier! Author: xu4n_ch3n Version: 2.2.0 Update Time: 2024-05-24 Description: Emby Notifier is a media notification service for Emby Server. Now Jellyfin Server is alreay supported. Repository: https://github.com/Ccccx159/Emby_Notifier Checking environment variables... TMDB_API_TOKEN: (req) eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI4YTFjMWFiMmYyN2IwNzc5YzdjMjY4ODE2YjYyMWZjYSIsInN1YiI6IjYxZTRkYjc4OTA0ZjZkMDA0MjU1MTM3NSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Paxpf40iJF_xFAPs5UhQYj8bDD_P5nns4QQuO-Q6mS0 TVDB_API_KEY: (opt) None TG_BOT_TOKEN: (req) 74766G5RQC7xxxI9ENz9XZ3b_t8 TG_CHAT_ID: (req) 51xxx6 LOG_LEVEL: (opt) INFO LOG_EXPORT: (opt) False LOG_PATH: (opt) /var/tmp/emby_notifier_tg/ ERROR!!! Please set the required environment variables, and restart the service.

Ccccx159 commented 2 months ago

看你第一条发的,貌似是telegram的chat id不正确,返回结果里面没有title 字段,我印象中chat id 好像是个负值,你先确认一下看看?

Ccccx159 commented 2 months ago

如果 chat id 没有问题的话,请将日志等级设置为DEBUG,然后重新启动后提供更多得日志

907739769 commented 2 months ago

Welcome to Emby Notifier! Author: xu4n_ch3n Version: 2.2.0 Update Time: 2024-05-24 Description: Emby Notifier is a media notification service for Emby Server. Now Jellyfin Server is alreay supported. Repository: https://github.com/Ccccx159/Emby_Notifier Checking environment variables... TMDB_API_TOKEN: (req) eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI4YTFjMWFiMmYyN2IwNzc5YzdjMjY4ODE2YjYyMWZjYSIsInN1YiI6IjYxZTRkYjc4OTA0ZjZkMDA0MjU1MTM3NSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Paxpf40iJF_xFAPs5UhQYj8bDD_P5nns4QQuO-Q6mS0 TVDB_API_KEY: (opt) None TG_BOT_TOKEN: (req) 7476680xxxb_t8 TG_CHAT_ID: (req) 51xxxx46 LOG_LEVEL: (opt) DEBUG LOG_EXPORT: (opt) False LOG_PATH: (opt) /var/tmp/emby_notifier_tg/ ERROR!!! Please set the required environment variables, and restart the service.

907739769 commented 2 months ago

如果 chat id 没有问题的话,请将日志等级设置为DEBUG,然后重新启动后提供更多得日志

chatid我用的用户id 别的tg通知我也是填的用户ID 没有用频道 就用机器人的单聊通知

Ccccx159 commented 2 months ago

如果 chat id 没有问题的话,请将日志等级设置为DEBUG,然后重新启动后提供更多得日志

chatid我用的用户id 别的tg通知我也是填的用户ID 没有用频道 就用机器人的单聊通知

我测试了一下,如果 chat_id 填写的是 bot 或 用户 id,在校验过程中会存在校验通过,但是由于此时 tg 返回的结果和填充 channel id 不同而导致的失败问题。此问题我会在下个 patch 中进行修复

同时我也测试了消息发送的流程,如果期望 bot 单独给你个人发送消息的话,chat id 需要填充你自己的 个人用户 id,请确保这一点。

Ccccx159 commented 2 months ago

预计在下周二或周三进行修复

shmily1866 commented 2 months ago

预计在下周二或周三进行修复

我也是用的用户id,怪不得总失败,等佬修复

Ccccx159 commented 2 months ago

docker hub 镜像已推送更新,新版本在校验过程中会向 chat id 所指对象发送版本信息,当前版本为 v2.2.2,请注意核对版本。使用过程中有任何问题,欢迎反馈~

907739769 commented 2 months ago

修复了 感谢