cabernetwork / cabernet

Cabernet allows control of IPTV streams. Plugins supports DaddyLive, Pluto TV, XUMO, M3U/XMLTV.XML files (SamsungTV, STIRR, DistroTV, Plex TV)
https://cabernetwork.github.io
MIT License
184 stars 25 forks source link

ERROR:scheduler UNEXPECTED EXCEPTION on GET #121

Closed purplescorpion1 closed 9 months ago

purplescorpion1 commented 9 months ago

Just noticed this error from the scheduler. I presume its related to the pickle update.

This is from RC12 on windows

2023-12-22 06:11:26,677-ERROR:scheduler UNEXPECTED EXCEPTION on GET='NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "C:\Program Files\cabernet\lib\schedule\scheduler.py", line 157, in call_trigger
    results = call_f()
  File "C:\Program Files\cabernet\lib\plugins\plugin_obj.py", line 238, in refresh_epg
    return self.refresh_it('EPG', _instance)
  File "C:\Program Files\cabernet\lib\plugins\plugin_obj.py", line 254, in refresh_it
    instance.refresh_epg()
  File "C:\Program Files\cabernet\lib\plugins\plugin_instance_obj.py", line 166, in refresh_epg
    return self.epg.refresh_epg()
  File "C:\Program Files\cabernet\lib\plugins\plugin_epg.py", line 85, in refresh_epg
    self.refresh_programs(epg_day, False)
  File "C:\Program Files\cabernet\plugins_ext\provider_video_daddylive\lib\epg.py", line 59, in refresh_programs
    program_list = self.get_fullday_programs(_epg_day)
  File "C:\Program Files\cabernet\plugins_ext\provider_video_daddylive\lib\epg.py", line 93, in get_fullday_programs
    ch_sched = self.plugin_obj.plugins[ch['json']['plugin']].plugin_obj \
  File "C:\Program Files\cabernet\lib\plugins\plugin_obj.py", line 118, in get_channel_day_ext
    return self.instances[_instance].get_channel_day(_zone, _uid, _day)
  File "C:\Program Files\cabernet\lib\plugins\plugin_instance_obj.py", line 102, in get_channel_day
    return self.epg.get_channel_day(_zone, _uid, _day)
  File "C:\Program Files\cabernet\plugins_ext\provider_epg_tvguide\lib\epg.py", line 57, in get_channel_day
    json_data = self.get_uri_data(uri, 2)
  File "C:\Program Files\cabernet\lib\common\decorators.py", line 63, in wrapper_func
    x = f(self, *args, **kwargs)
  File "C:\Program Files\cabernet\lib\common\decorators.py", line 159, in wrapper_func
    return f(self, *args, **kwargs)
  File "C:\Program Files\cabernet\lib\plugins\plugin_epg.py", line 68, in get_uri_data
    resp = self.plugin_obj.http_session.get(_uri, headers=header, timeout=8)
AttributeError: 'NoneType' object has no attribute 'get' 
rocky4546 commented 9 months ago

yep. its another pickle item. Trying to figure out how to make this fix better than patching all over the place.

rocky4546 commented 9 months ago

ok, I have made a more appropriate change and added a wrapper class for the pickling issue. it looks like it fixed it for all cases, but I did remove most of what I added yesterday. Anyway RC13 is out there. Feeling better today.

purplescorpion1 commented 9 months ago

Glad you are feeling better.

No issues with update and epg is running as scheduled on boot without issue so i'll mark this as closed for now