NightFeather0615 / YouTube-Stream-Status-publish

Mozilla Public License 2.0
1 stars 1 forks source link

AttributeError: 'NoneType' object has no attribute 'timestamp' #1

Open Sakuya0502 opened 2 years ago

Sakuya0502 commented 2 years ago

無法顯示待機通知,如果該頻道有待機時都會顯示這個錯誤訊息: AttributeError: 'NoneType' object has no attribute 'timestamp' 跳這個錯誤之後就沒辦法繼續偵測了 以下是完整的錯誤訊息:

Unhandled exception in internal background task 'track_stream_status'.
Traceback (most recent call last):
  File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\tasks\__init__.py", line 101, in _loop
     await self.coro(*args, **kwargs)
   File "C:\Users\桌面\Discord-yt\main.py", line 197, in track_stream_status
    msg = await process_notify_message("end", video_id)
   File "C:\Users\桌面\Discord-yt\main.py", line 109, in process_notify_message
    msg = msg.replace("$[actual_start_timestamp]$", str(round(actual_start_time.timestamp()) + (utc_timezone * 3600)))
AttributeError: 'NoneType' object has no attribute 'timestamp'

請問這是怎麼了?

NightFeather0615 commented 2 years ago

非常抱歉造成你的困擾 很不幸地,最近YouTube API更新了 我需要找個時間重寫,才能配合新的API架構 如果你願意幫忙的話,歡迎提出Pull requests