Closed cweiske closed 2 years ago
That's very odd, and quite unlike anything I've seen before. I just tried your sequence on a .png file and it all worked as expected (but I'm using earlier versions of Python, PyGObject, GExiv2 and GLib). Can you run it with higher verbosity ('-v' or '-vv' on the command line) and see if there's any useful error messages.
No additional output with -v, ,-vv and -vvv - only the same I got before:
No module named 'gpxpy'
No module named 'flickrapi'
No module named 'requests_oauthlib'
When using -vvv a popup window came that contains
06:16:05: INFO: stdout: No module named 'flickrapi'
06:16:05: INFO: stdout: No module named 'requests_oauthlib'
No messages, even when attempting to save a file as before? What operating system are you using?
If you want to revert to the previous version of Photini you can install it with pip:
pip install photini==2021.1.0
I am using Debian unstable. Now I upgraded the system packages, and now photini works again. Sorry for the trouble of the unnecessary bug report.
The packages that got updated were:
base-passwd bash bison caja-nextcloud chromium chromium-common chromium-sandbox debian-mate-default-settings dh-strip-nondeterminism firefox firefox-l10n-de gir1.2-goa-1.0 gir1.2-gtk-2.0 gir1.2-gtk-3.0 gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0 gnome-desktop3-data gnome-online-accounts gnome-settings-daemon gnome-settings-daemon-common gnome-sound-recorder graphviz gtk-update-icon-cache gtk2-engines-pixbuf htop libass9 libbcmail-java libbcpg-java libbcpkix-java libbcprov-java libcdt5 libcgraph6 libcpupower1 libdebconfclient0 libdjvulibre-text libdjvulibre21 libfile-stripnondeterminism-perl libfreerdp2-2 libgail-3-0 libgail-common libgail18 libgcrypt20 libgnome-desktop-3-19 libgoa-1.0-0b libgoa-1.0-common libgoa-backend-1.0-1 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk-3-dev libgtk2.0-0 libgtk2.0-0-dbgsym libgtk2.0-bin libgtk2.0-common libgtk2.0-dev libgvc6 libgvpr2 libjavascriptcoregtk-4.0-18 liblab-gamut1 libldap-2.4-2 libldap-common liblz4-1 libmariadb3 libmd4c0 libnextcloudsync0 libopenexr25 libpathplan4 libphonon4qt5-4 libphonon4qt5-data libpq5 libreadline8 libsmbclient libwbclient0 libwebkit2gtk-4.0-37 libwinpr2-2 libx11-6 libx11-data libx11-dev libx11-xcb1 libxml2 libxml2-utils linux-compiler-gcc-10-x86 linux-kbuild-5.10 linux-libc-dev lz4 mariadb-common mate-session-manager nextcloud-desktop nextcloud-desktop-common nextcloud-desktop-doc nextcloud-desktop-l10n phonon4qt5 php-symfony-config php-symfony-console php-symfony-dependency-injection php-symfony-filesystem php-symfony-finder php-symfony-process python-pip-whl python3-libxml2 python3-pip python3-samba python3-six python3-urllib3 readline-common redis redis-server redis-tools samba-common samba-common-bin samba-dsdb-modules samba-libs smbclient vinagre virtualbox virtualbox-dkms virtualbox-qt zenity zenity-common
I can't see an obvious candidate in that list to cause your problem, but there's a few gtk ones in there that gexiv2 might be using. I suppose the point of Debian unstable is that sometimes things break. I prefer an older, more stable environment myself.
Just chiming in to say that I had the same experience but on Windows with version 2021.7.0. Entered data for several jpg images but nothing was saved. A xmp file was created for each file but nothing saved in the image itself and nothing being written to the sidecar as far as I have seen either. Can provide more input if it would be helpful.
I've just tried this on Ubuntu 20.04, with GExiv2 0.12.0, and am able to reproduce the problem. The exiv2 command line program (on the same machine) can set metadata without any problem, after which Photini works as you'd expect. So a nasty workaround is to set some data first:
exiv2 -M"add Exif.Image.ImageDescription Hello world" problem_file.jpg
and then run Photini.
I'll investigate further to see if I can find out what's happening.
Eureka! In Photini I have a class ImageMetadata
derived from GExiv2.MetaData
. If an image can't be opened (e.g. a file format that exiv2 doesn't recognise) then the variable that's usually set to an instance of ImageMetadata
is set to None
. This variable is checked to see if Photini should attempt to save to the file.
Recent versions of GExiv2 have got clever, so bool(GExiv2.MetaData)
returns False
if the metadata is empty!
If anyone needs to fix their copy of Photini before the next release comes out, find the file exiv2.py
in your installed copy of Photini, edit it and insert a __bool__
method just before the get_exif_thumbnail
method (around line 150).
def __bool__(self):
return True
def get_exif_thumbnail(self):
Excellent @jim-easterbrook ! Thanks for the follow up and fix. So just to be sure I understand, is Photini not able to write directly to my jpg image files? And therefore the check to see if it can be written to fails? Just want to be sure I know what to test, but happy to do it. And make your recommended change.
No, the problem with bool(GExiv2.MetaData)
being False was that Photini thought it didn't have an image file it could write to, then thought it didn't have a sidecar it could write to. Once we provide our own __bool__
method then any writeable file should be written OK.
Got it. I will try your fix tonight and report back.
Making your update did the trick. All data is being saved directly to the jpg file and no sidecar files are being generated. Thanks for the quick fix and the awesome tool!
Photini version 2021.9.0 is out now, and should fix this bug.
I upgraded to 2021.4.0 to test multi-thumbnail reloading (#59) and now photini is useless: It does not save title or copyright anymore into the files, and always creates .xmp files.
Symptoms
photini 01.png
The same happens when using "Save" in the "File" menu.
Version
I'm using a German language setting.