service.iptv.manager
service.iptv.manager copied to clipboard
version "0.2.3+matrix.1" error
ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'list' object has no attribute 'encode'
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.iptv.manager/default.py", line 9, in <module>
run(sys.argv)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.iptv.manager/resources/lib/functions.py", line 67, in run
function_map.get(function)()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.iptv.manager/resources/lib/functions.py", line 31, in refresh
Addon.refresh(True)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.iptv.manager/resources/lib/modules/addon.py", line 93, in refresh
IptvSimple.write_epg(epg, channels)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.iptv.manager/resources/lib/modules/iptvsimple.py", line 178, in write_epg
fdesc.write(epg.encode('utf-8'))
AttributeError: 'list' object has no attribute 'encode'
-->End of Python script error report<--
It seems a list is provided where a string is expected. This we should check and handle in IPTV Manager, but the cause is likely to be an error in the data structure.
It can be a string in case you want to pass raw xmltv, or a dict in case it's json-epg, but not a list.
See https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/iptvsimple.py#L178
In addon.py, "epg" is set as list. change with "epg_list" will make it work.
https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/addon.py#L54
https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/addon.py#L82
https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/addon.py#L93
https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/addon.py#L213
https://github.com/add-ons/service.iptv.manager/blob/513e25d8ce564299628d5f84661c28a472b2709c/resources/lib/modules/addon.py#L217