biscuit icon indicating copy to clipboard operation
biscuit copied to clipboard

bug: invalid command name "PyImagingPhoto"

Open pawamoy opened this issue 1 year ago • 2 comments
trafficstars

Bug

Describe the bug

When opening a folder in Biscuit, I get these errors in the logs (standard output/error):

>  ~/Downloads/biscuit .
The environment does not allow connecting to the splash screen. Are the splash resources attached to the bootloader or did an error occur?
Traceback (most recent call last):
  File "PyInstaller/fake-modules/pyi_splash.py", line 98, in <module>
  File "os.py", line 680, in __getitem__
KeyError: '_PYIBoot_SPLASH'
Exception in Tkinter callback
Traceback (most recent call last):
  File "PIL/ImageTk.py", line 65, in _pyimagingtkcall
_tkinter.TclError: invalid command name "PyImagingPhoto"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tkinter/__init__.py", line 1921, in __call__
  File "/tmp/_MEIWWgz5r/tkinterweb/bindings.py", line 655, in on_image
    image = blankimage(name)
  File "/tmp/_MEIWWgz5r/tkinterweb/imageutils.py", line 136, in blankimage
    image = PhotoImage(image, name=name)
  File "PIL/ImageTk.py", line 129, in __init__
  File "PIL/ImageTk.py", line 183, in paste
  File "PIL/ImageTk.py", line 69, in _pyimagingtkcall
ModuleNotFoundError: No module named 'PIL._tkinter_finder'
Exception in Tkinter callback
Traceback (most recent call last):
  File "PIL/ImageTk.py", line 65, in _pyimagingtkcall
_tkinter.TclError: invalid command name "PyImagingPhoto"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tkinter/__init__.py", line 1921, in __call__
  File "/tmp/_MEIWWgz5r/tkinterweb/bindings.py", line 655, in on_image
    image = blankimage(name)
  File "/tmp/_MEIWWgz5r/tkinterweb/imageutils.py", line 136, in blankimage
    image = PhotoImage(image, name=name)
  File "PIL/ImageTk.py", line 129, in __init__
  File "PIL/ImageTk.py", line 183, in paste
  File "PIL/ImageTk.py", line 69, in _pyimagingtkcall
ModuleNotFoundError: No module named 'PIL._tkinter_finder'
# repeats a dozen times, maybe number of images in my folder?

Biscuit still works, but if I try to open an image, it simply opens a text editor with no contents (not sure if related).

System Information

  • OS: ArchLinux
  • Python Version: 3.11
  • Biscuit 2.57.0 downloaded from CI artifacts

pawamoy avatar Jan 09 '24 14:01 pawamoy

Thanks for opening an issue on this! otherwise this would've never gotten to my attention. Apparently arch linux installation is missing tcl/tk installation ig, so I will have to modify the build to bundle that as well, will share updates on this.

tomlin7 avatar Jan 11 '24 11:01 tomlin7

FYI: most Linux distros don't install tcl/tk by default, but that isn't related.

When you install PIL on Linux, it won't install the ImageTk part that makes it work with tkinter. You need to install it separately, most of the times with the distro's package manager (the package name is python3-pil.imagetk on Debian for example)

rdbende avatar Apr 07 '24 08:04 rdbende