When I put kodi in debug mode, I can see this following lines:
[kodi@kodi-htpc:~]$ grep -A15 "PythonToCppException" .kodi/temp/kodi.log
2022-09-23 17:38:51.776 T:1052 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ModuleNotFoundError'>
Error Contents: No module named 'PIL'
Traceback (most recent call last):
File "/home/kodi/.kodi/addons/script.embuary.helper/service.py", line 6, in <module>
from resources.lib.service_monitor import *
File "/home/kodi/.kodi/addons/script.embuary.helper/resources/lib/service_monitor.py", line 12, in <module>
from resources.lib.utils import split
File "/home/kodi/.kodi/addons/script.embuary.helper/resources/lib/utils.py", line 20, in <module>
from resources.lib.image import *
File "/home/kodi/.kodi/addons/script.embuary.helper/resources/lib/image.py", line 12, in <module>
from PIL import ImageFilter,Image,ImageOps,ImageEnhance
ModuleNotFoundError: No module named 'PIL'
-->End of Python script error report<--
But, PIL is installed by:
[kodi@kodi-htpc:~]$ grep -A5 -B4 "pillow" /etc/nixos/configuration.nix
my-python-packages = python-packages: with python-packages; [
python-with-my-packages = python3.withPackages my-python-packages;
And see in modules:
Python 3.9.13 (main, May 17 2022, 14:19:07)
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Please wait a moment while I gather a list of all available modules...
Unfortunately we cannot package many kodi skins. The prevailing norm for many of the fancy skins is to dynamically rewrite it’s own code at runtime and it is very incredible to a point of being “impossible” in a practical sense to do so.
This isn’t the python that kodi uses: kodi defines its own which includes pil(low) as seen here.
I’m curious why this isn’t working. I use that skin as well. How do I reproduce the error and visually what will I see to indicate a problem? With kodi I mentally ignore errors which don’t have noticable impact because I always watch kodi from a couch using a tv remote to control it.
I would like to look into your issue so please list as many details that could be relevant that you can.
And again, even if all dependencies were packaged it still would not run. Many kodi skins need to be able to write and rewrite their own resources and sometimes even code. There is no practical way to package this for nixpkgs.
I wasn’t able to reproduce your error. This error is strange because PIL should be available to kodi… Can you please try a fresh install of kodi and use version 1.1.61 of the skin? This is the version I am currently using.
I’m sorry this post really slipped by my attention.
I ended up going through your video a few times and had inconsistent results. With the time spent I wasn’t able to figure out what the issue was nor consistently reproduce it. There is a reason for your issue… I’m just not sure what. I’m trying to find the motivation to continue investigation.
There are a few things I want to mention:
Automatic add-on updates are enabled by default and this seems like a bad default if nix is managing software… though a good idea if nix is not. We should consider changing this value. I wonder if any add-ons are being automatically updated in your case, though doubt it.
The kodi team isn’t overly active on kodi. We keep it up to date and occasionally do some code cleanup. This puts you in a position of being under supported, which is not fair to you. I wish we were more active and helpful… but this isn’t the reality, likely because kodi mostly works for us and isn’t the easiest code base to work with.
If anyone else is interested in helping out we could always use a hand.