[KPhotoAlbum] EXIF DB questions

Johannes Zarl-Zierl johannes at zarl-zierl.at
Sat Aug 29 15:47:49 BST 2015


Hi Tobias,

> With the recent lens patches, I get
> 
> 	Error running query: alter table exif add column Exif_Photo_LensModel
> 	string
> 	Error was: No query Unable to fetch row
> 
> when starting KPA. This does not seem to bother KPA, I just noticed it and
> thought this could be interesting ...


This sounds like you might have run the original patch for adding the lens 
model. That version didn't include graceful upgrade of the exif db schema, 
yet.

Can you show me the output of the following commands?

sqlite3 exif-info.db 'select * from settings;'
sqlite3 exif-info.db .schema


> And another thing: I usually run KPA with my default locale de_DE. When I
> start it in the C locale (e. g. to be able to post an original error message
> like the above), two things happen:
> 
> I get a lot of these messages:
> 
> 	Error running query: INSERT into exif values (?, ?, ?, ?, ?, ?, ?, ?, ?,
> 	?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
> 	Error was: UNIQUE constraint failed: exif.filename Unable to fetch row

Maybe you have filenames that are somehow interpreted as being the same when 
you use the c locale. I guess this doesn't happen with a locale of en_US.utf8?

Maybe you can get a more descriptive error message using sqlite. Can you try 
running some queries (e.g. 'select filename from exif;') using the C locale 
with sqlite? Maybe the sqlite client prints a more detailed error message 
containing the keys that are deemed not unique...

> and: KPA starts to re-scan the whole collection.

That's somewhat surprising. AFAICS KPA does not recreat the exif db even if 
there has been a problem in the exif db.


> Shouldn't the persistence layer be independent of the used locale?

Normally, yes. The data should always arrive in the exif db as utf-8. Having 
no additional info, I would wager that using the C locale affects UTF-8 
handling in the Qt SQL classes that we use.


  Johannes



More information about the Kphotoalbum mailing list