Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version "0.2.3+matrix.1" error #87

Open
Lunatixz opened this issue Apr 22, 2021 · 3 comments
Open

version "0.2.3+matrix.1" error #87

Lunatixz opened this issue Apr 22, 2021 · 3 comments
Labels
question Further information is requested

Comments

@Lunatixz
Copy link

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<--
                                                   
@Lunatixz Lunatixz changed the title version="0.2.3+matrix.1" error version "0.2.3+matrix.1" error Apr 22, 2021
@dagwieers
Copy link
Contributor

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.

@michaelarnauts
Copy link
Contributor

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

fdesc.write(epg.encode('utf-8'))

@BadWolf-63
Copy link

BadWolf-63 commented May 4, 2021

In addon.py, "epg" is set as list.
change with "epg_list" will make it work.

epg.append(addon.get_epg())

IptvSimple.write_epg(epg, channels)

if not data.get('epg'):

@dagwieers dagwieers added the question Further information is requested label Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants