Closed brianx87 closed 10 months ago
I'm having the exact same issue on Steam Deck since updating to protontricks 1.10.4.
EDIT: For those that need to get it working and have their sudo password set up, you can downgrade to 1.10.3 by running this: sudo flatpak update --commit=828719815e853cbdd2d2dd36039596f033ea4fab476e4f4fd999a1c87dacafff com.github.Matoking.protontricks
I'm having the same issue.
`Protontricks was closed due to the following error:
Traceback (most recent call last): File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 639, in _save rawmode = RAWMODE[im.mode] KeyError: 'P'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/app/lib/python3.10/site-packages/protontricks/cli/util.py", line 149, in wrapper return cli_func(self, *args, **kwargs) File "/app/lib/python3.10/site-packages/protontricks/cli/main.py", line 264, in main steam_app = select_steam_app_with_gui( File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 318, in select_steam_app_with_gui appid2icon = _get_appid2icon(steam_apps, steam_path=steam_path) File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 104, in _get_appid2icon resized_img.save(icon_cache_path) File "/app/lib/python3.10/site-packages/PIL/Image.py", line 2413, in save save_handler(self, fp, filename) File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 642, in _save raise OSError(msg) from e OSError: cannot write mode P as JPEG
@kristoffertell, unfortunately your suggestion didn't work but thank you!
Similar issue here, except instead of "P as JPEG" it's "RGBA as JPEG" In my case, seems to be related to using custom icons from SteamGridDB. Downgrading using the command from @kristoffertell got the gui to open.
I'm having the same issue.
`Protontricks was closed due to the following error: Traceback (most recent call last): File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 639, in _save rawmode = RAWMODE[im.mode] KeyError: 'P' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/lib/python3.10/site-packages/protontricks/cli/util.py", line 149, in wrapper return cli_func(self, *args, **kwargs) File "/app/lib/python3.10/site-packages/protontricks/cli/main.py", line 264, in main steam_app = select_steam_app_with_gui( File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 318, in select_steam_app_with_gui appid2icon = _get_appid2icon(steam_apps, steam_path=steam_path) File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 104, in _get_appid2icon resized_img.save(icon_cache_path) File "/app/lib/python3.10/site-packages/PIL/Image.py", line 2413, in save save_handler(self, fp, filename) File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 642, in _save raise OSError(msg) from e OSError: cannot write mode P as JPEG
@kristoffertell, unfortunately your suggestion didn't work but thank you!
I have fixed the issue.
The last line of the log report says
App icon /home/deck/.local/share/Steam/appcache/librarycache/1092660_icon.jpg has unusual size, resizing
Your specific icon will be different but you need to locate the icon mentioned above, in the same directory. Once done so, open the image and it will show you its dimension - this needs to be 32x32 however most icons are 512x512.
If you have a photo editor like GIMP installed then you can resize the image to 32x32. if not, you can visit sites like iloveimg.com which will resize the image to your specific dimensions.
Replace the old icon with the new one, keep the names exactly the same.
Once you've replaced this icon PT should open without any problems.
If multiple icon are highlighted you will need to replace all of them.
I pushed a small fix to icon conversion that should hopefully fix this. You can install the development version with this fixed applied using the following command:
flatpak install --user https://dl.flathub.org/build-repo/44386/com.github.Matoking.protontricks.flatpakref
Does this fix the bug?
It has!!! Thank you very much for the update
I pushed a small fix to icon conversion that should hopefully fix this. You can install the development version with this fixed applied using the following command:
flatpak install --user https://dl.flathub.org/build-repo/44386/com.github.Matoking.protontricks.flatpakref
Does this fix the bug?
Not for me, unfortunately:
Protontricks was closed due to the following error:
Traceback (most recent call last): File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 639, in _save rawmode = RAWMODE[im.mode] KeyError: 'RGBA'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/app/lib/python3.10/site-packages/protontricks/cli/util.py", line 149, in wrapper return cli_func(self, *args, **kwargs) File "/app/lib/python3.10/site-packages/protontricks/cli/main.py", line 264, in main steam_app = select_steam_app_with_gui( File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 318, in select_steam_app_with_gui appid2icon = _get_appid2icon(steam_apps, steam_path=steam_path) File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 104, in _get_appid2icon resized_img.save(icon_cache_path) File "/app/lib/python3.10/site-packages/PIL/Image.py", line 2413, in save save_handler(self, fp, filename) File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 642, in _save raise OSError(msg) from e OSError: cannot write mode RGBA as JPEG
I pushed a small fix to icon conversion that should hopefully fix this. You can install the development version with this fixed applied using the following command:
flatpak install --user https://dl.flathub.org/build-repo/44386/com.github.Matoking.protontricks.flatpakref
Does this fix the bug?
Not for me, unfortunately:
Protontricks was closed due to the following error: Traceback (most recent call last): File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 639, in _save rawmode = RAWMODE[im.mode] KeyError: 'RGBA' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/lib/python3.10/site-packages/protontricks/cli/util.py", line 149, in wrapper return cli_func(self, *args, **kwargs) File "/app/lib/python3.10/site-packages/protontricks/cli/main.py", line 264, in main steam_app = select_steam_app_with_gui( File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 318, in select_steam_app_with_gui appid2icon = _get_appid2icon(steam_apps, steam_path=steam_path) File "/app/lib/python3.10/site-packages/protontricks/gui.py", line 104, in _get_appid2icon resized_img.save(icon_cache_path) File "/app/lib/python3.10/site-packages/PIL/Image.py", line 2413, in save save_handler(self, fp, filename) File "/app/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 642, in _save raise OSError(msg) from e OSError: cannot write mode RGBA as JPEG
The image mode should have been converted to RGB
at that point, but the exception seems to show that image with RGBA
(i.e. with an alpha channel) being written.
Please check if the correct version is installed by running these commands:
$ flatpak run --command=bash com.github.Matoking.protontricks
# Run the following inside the new shell
$ grep 'resized_img' /app/lib/python3.10/site-packages/protontricks/gui.py
resized_img = img.resize(APP_ICON_SIZE).convert("RGB")
resized_img.save(icon_cache_path)
The grep
command should print a line with convert("RGB")
, indicating the development version is installed. If not, something else is going on. You can try uninstalling Protontricks and then using the provided command.
The image mode should have been converted to
RGB
at that point, but the exception seems to show that image withRGBA
(i.e. with an alpha channel) being written.Please check if the correct version is installed by running these commands:
You were right, I was indeed running the wrong version.
Managed to actually install and run the dev version and it seems to run perfectly now :)
I'm still seeing this issue on my Steam Deck. Tried the above but the link says "server not found"
I released 1.10.5 with the icon conversion fix which should fix this problem.
I'll see what version I have. It certainly appears to be the latest one available on the Discover app, but I'll confirm
Receiving the following error when launching PT. I've removed the list of non-steam game shortcuts from the error message as the list was quite long. Tried reinstalling and restarting with no luck.