Help with Python Imaging Library issue on FireTV
#1
I am trying to support the original PseudoTV add-on since SteveB has taken a break.  A user has asked for help with an issue, and we found that they are getting an exception when PSTV calls Python Imaging Library:

Code:
2020-06-29 16:24:55.599 T:11042 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: [Errno 22] Invalid argument
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 271, in onInit
self.setFirstChannel(self.currentChannel)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 442, in setFirstChannel
self.showChannelLabel(self.currentChannel)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 724, in showChannelLabel
self.setChannelBug()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 781, in setChannelBug
converted_img = original.convert('LA')
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 833, in convert
self.load()
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 195, in load
seek(o)
IOError: [Errno 22] Invalid argument
-->End of Python script error report<--

The code, which converts a logo into a monochrome image, has been working fine for most users for a long time.  This user is on FireTV.  I am wondering if something about that operating system might cause the user to have a wrong version of script.module.pill or something like that.

User provided a fuller debug log here (it's not a full debug log but i am sure one could be provided if it would help) and the PSTV code that is utilizing PIL can be seen here.

Any tips/thoughts would be appreciated!
Maintaining a few add-ons for v18 including PseudoTV (Classic), Tag Overview, and Autosub: https://github.com/fnord12
Reply
#2
(2020-07-02, 01:08)fnord12 Wrote: I am trying to support the original PseudoTV add-on since SteveB has taken a break.  A user has asked for help with an issue, and we found that they are getting an exception when PSTV calls Python Imaging Library:

Code:
2020-06-29 16:24:55.599 T:11042 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IOError'>
Error Contents: [Errno 22] Invalid argument
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 271, in onInit
self.setFirstChannel(self.currentChannel)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 442, in setFirstChannel
self.showChannelLabel(self.currentChannel)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 724, in showChannelLabel
self.setChannelBug()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.pseudotv/resources/lib/Overlay.py", line 781, in setChannelBug
converted_img = original.convert('LA')
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/Image.py", line 833, in convert
self.load()
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/addons/script.module.pil/lib/PIL/ImageFile.py", line 195, in load
seek(o)
IOError: [Errno 22] Invalid argument
-->End of Python script error report<--

The code, which converts a logo into a monochrome image, has been working fine for most users for a long time.  This user is on FireTV.  I am wondering if something about that operating system might cause the user to have a wrong version of script.module.pill or something like that.

User provided a fuller debug log here (it's not a full debug log but i am sure one could be provided if it would help) and the PSTV code that is utilizing PIL can be seen here.

Any tips/thoughts would be appreciated!



Maybe this could help: 356344 (thread)
Reply
#3
Thanks.  I'll reach out to the person having the problem and see if we can tweak the code along those lines.  Really appreciate it!
Maintaining a few add-ons for v18 including PseudoTV (Classic), Tag Overview, and Autosub: https://github.com/fnord12
Reply

Logout Mark Read Team Forum Stats Members Help
Help with Python Imaging Library issue on FireTV0