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

ImportError: No module named PIL #72

Closed
woutbr opened this issue Nov 5, 2019 · 2 comments
Closed

ImportError: No module named PIL #72

woutbr opened this issue Nov 5, 2019 · 2 comments

Comments

@woutbr
Copy link

woutbr commented Nov 5, 2019

I use the skin Embuary which in turn uses the addon script.embuary.helper
The addon gives the following error every time I launch Kodi or the skin wants to do anything with images.
The relevant error from the debug log:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
 - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named PIL
Traceback (most recent call last):
  File "/home/Ken/.var/app/tv.kodi.Kodi/data/addons/script.embuary.helper/service.py", line 6, in <module>
	from resources.lib.service_monitor import *
  File "/home/Ken/.var/app/tv.kodi.Kodi/data/addons/script.embuary.helper/resources/lib/service_monitor.py", line 12, in <module>
	from resources.lib.utils import split
  File "/home/Ken/.var/app/tv.kodi.Kodi/data/addons/script.embuary.helper/resources/lib/utils.py", line 20, in <module>
	from resources.lib.image import *
  File "/home/Ken/.var/app/tv.kodi.Kodi/data/addons/script.embuary.helper/resources/lib/image.py", line 12, in <module>
	from PIL import ImageFilter,Image,ImageOps
ImportError: No module named PIL
-->End of Python script error report<--
DEBUG: onExecutionDone(6, /home/Ken/.var/app/tv.kodi.Kodi/data/addons/script.embuary.helper/service.py)

Here is the full Kodi debug log.
The importerror happens in the following file from the addon: https://github.com/sualfred/script.embuary.helper/blob/master/resources/lib/image.py

This might be a similar issue to #40. But here python2 needs Pillow.

I have the current flatpak installed. Running "flatpak info tv.kodi.Kodi" gives this:

$ flatpak info tv.kodi.Kodi
Ref: app/tv.kodi.Kodi/x86_64/stable
ID: tv.kodi.Kodi
Arch: x86_64
Branch: stable
Origin: flathub
Collection ID: org.flathub.Stable
Date: 2019-09-06 15:49:32 +0000
Subject: Update the visualization.goom addon (760e5d4e)
Commit: 65f284f61eadf2dfeb5fd238e0c930f5000f3c4e0557a8b7b4ad5d06538f55a5
Parent: 8ca27e4fbae66709e9c318da71bc55294234b7e7ab7d643ca855b2ccc39140d4
Location: /var/lib/flatpak/app/tv.kodi.Kodi/x86_64/stable/65f284f61eadf2dfeb5fd238e0c930f5000f3c4e0557a8b7b4ad5d06538f55a5
Installed size: 300.3 MB
Runtime: org.freedesktop.Platform/x86_64/18.08
Sdk: org.freedesktop.Sdk/x86_64/18.08
@Marko10-000
Copy link
Contributor

I added pillow (PIL) for python 2.7. It's shrinked because I didn't get it to compile/linked with zlib and jpeg (the error output wasn't that helpful) but your Skin Embuary should work now (at least no error popup occurred during starting Kodi/written into the log file). When problem still exist please reopen the issue.

PS: Oh no a Christmas theme is played after starting Kodi...

@woutbr
Copy link
Author

woutbr commented Dec 10, 2019

Thank you. I updated and the error hasn't shown up any more. Menus that previously gave the error work now.
PS: I can now hear the Christmas music too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants