I run today an old python script in my Fedora 41 to create an image and the result after running was:
mythcat@localhost:~$ python test_001.py
gio: file:///tmp/tmpwy1k4wyo.PNG: Failed to find default application for content type ‘image/png’
This can be fixed with an default application for images like feh:
$ sudo dnf5 install feh