[digiKam-users] No thumbnails in people view

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[digiKam-users] No thumbnails in people view

omame
Hello users!

Mac OS user here who has recently migrated a photo collection to Digikam
6.4.
I ran the face detection and then recognition on all my pictures and got the
results in the people view.
Thing is, it doesn't show any thumbnails when I select anything from the
people tree:

<http://digikam.1695700.n4.nabble.com/file/t377043/Screenshot_2020-05-18_at_21.png>

Before you ask, I know that nothing is selected in the screenshot. I just
noticed it after I finished redacting the names.
Take my word that nothing changes no matter what you select in the tree.

I've also attempted to upgrade to 7.0-beta3 but had no luck.
If it may be useful information, I'm using mysql as the backend.

Does anyone have any hints? I'd like to at least see the results of hours of
scanning.

Thanks in advance.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: No thumbnails in people view

Gilles Caulier-4
Hi,

What do you seen ad debug statements when you start digiKam from a
terminal as explained here :

https://www.digikam.org/contribute/

Best

Gilles Caulier

Le lun. 18 mai 2020 à 23:05, omame <[hidden email]> a écrit :

>
> Hello users!
>
> Mac OS user here who has recently migrated a photo collection to Digikam
> 6.4.
> I ran the face detection and then recognition on all my pictures and got the
> results in the people view.
> Thing is, it doesn't show any thumbnails when I select anything from the
> people tree:
>
> <http://digikam.1695700.n4.nabble.com/file/t377043/Screenshot_2020-05-18_at_21.png>
>
> Before you ask, I know that nothing is selected in the screenshot. I just
> noticed it after I finished redacting the names.
> Take my word that nothing changes no matter what you select in the tree.
>
> I've also attempted to upgrade to 7.0-beta3 but had no luck.
> If it may be useful information, I'm using mysql as the backend.
>
> Does anyone have any hints? I'd like to at least see the results of hours of
> scanning.
>
> Thanks in advance.
>
>
>
> --
> Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: No thumbnails in people view

omame
Thanks Gilles. Thanks to your hint, I was able to solve this. I think there
is a chance for an improvement in digikam. Here's what I've done.

After starting digikam in debug mode, this is what I get when selecting any
name in the people view:

>digikam.general: Using  4  CPU core to run threads
>digikam.general: Action Thread run  1  new jobs
>digikam.database: " ( ( (ImageTagProperties.tagid=? OR
ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
ImageTagProperties.property=?  ) ) "

>digikam.database: Search query:
> "SELECT DISTINCT Images.id, Images.name, Images.album,      
> Albums.albumRoot,        ImageInformation.rating, Images.category,      
> ImageInformation.format, ImageInformation.creationDate,      
> Images.modificationDate, Images.fileSize,        ImageInformation.width,
> ImageInformation.height,        ImageTagProperties.value,
> ImageTagProperties.property, ImageTagProperties.tagid  FROM Images      
> INNER JOIN ImageTagProperties ON ImageTagProperties.imageid=Images.id      
> LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid      
> INNER JOIN Albums           ON Albums.id=Images.album WHERE
> Images.status=1 AND (  ( ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) )  );"
> (QVariant(int, 49), QVariant(int, 49), QVariant(QString,
> "autodetectedPerson"), QVariant(int, 49), QVariant(int, 49),
> QVariant(QString, "autodetectedFace"), QVariant(int, 49), QVariant(int,
> 49), QVariant(QString, "tagRegion"))
>digikam.dbengine: Prepare failed!
>digikam.dbengine: Failure executing query:
> "SELECT DISTINCT Images.id, Images.name, Images.album,      
> Albums.albumRoot,        ImageInformation.rating, Images.category,      
> ImageInformation.format, ImageInformation.creationDate,      
> Images.modificationDate, Images.fileSize,        ImageInformation.width,
> ImageInformation.height,        ImageTagProperties.value,
> ImageTagProperties.property, ImageTagProperties.tagid  FROM Images      
> INNER JOIN ImageTagProperties ON ImageTagProperties.imageid=Images.id      
> LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid      
> INNER JOIN Albums           ON Albums.id=Images.album WHERE
> Images.status=1 AND (  ( ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) OR ( (ImageTagProperties.tagid=? OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=?)) AND
> ImageTagProperties.property=?  ) )  );"
>Error messages: "QMYSQL3: Unable to prepare statement" "Access denied for
user 'digikam'@'localhost' (using password: YES)" "1045" 2

>Bound values:  ()
>digikam.dbengine: Failure executing query:
> "SELECT DISTINCT Images.id, Images.name, Images.album,      
> Albums.albumRoot,        ImageInformation.rating, Images.category,      
> ImageInformation.format, ImageInformation.creationDate,      
> Images.modificationDate, Images.fileSize,        ImageInformation.width,
> ImageInformation.height,        ImageTagProperties.value,
> ImageTagProperties.property, ImageTagProperties.tagid  FROM Images      
> INNER JOIN ImageTagProperties ON ImageTagProperties.imageid=Images.id      
> LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid      
> INNER JOIN Albums           ON Albums.id=Images.album WHERE
> Images.status=1 AND (  ( ( (ImageTagProperties.tagid=49 OR
> ImageTagProperties.tagid IN (SELECT id FROM TagsTree WHERE pid=49)) AND
> ImageTagProperties.property='autodetectedPerson'  ) OR (
> (ImageTagProperties.tagid=49 OR ImageTagProperties.tagid IN (SELECT id
> FROM TagsTree WHERE pid=49)) AND
> ImageTagProperties.property='autodetectedFace'  ) OR (
> (ImageTagProperties.tagid=49 OR ImageTagProperties.tagid IN (SELECT id
> FROM TagsTree WHERE pid=49)) AND ImageTagProperties.property='tagRegion'
> ) )  );"
>Error messages: "QMYSQL: Unable to execute query" "Access denied for user
'digikam'@'localhost' (using password: YES)" "1045" 2
>Bound values:  (QVariant(int, 49), QVariant(int, 49), QVariant(QString,
"autodetectedPerson"), QVariant(int, 49), QVariant(int, 49),
QVariant(QString, "autodetectedFace"), QVariant(int, 49), QVariant(int, 49),
QVariant(QString, "tagRegion"))
>digikam.general: Data From DBJobsThread is null:  true
>digikam.general: Failed to list url:  ""
>digikam.general: Event is dispatched to OSX desktop notifier
>digikam.general: Cancel Main Thread
>digikam.general: One job is done

Access denied? But digikam can connect just fine, else it wouldn't even
start!
So I opened up a mysql shell and ran the query manually:

>mariadb> SELECT DISTINCT Images.id, Images.name, Images.album,      
Albums.albumRoot,        ImageInformation.rating, Images.category,      
ImageInformation.format, ImageInformation.creationDate,      
Images.modificationDate, Images.fileSize,        ImageInformation.width,
ImageInformation.height,        ImageTagProperties.value,
ImageTagProperties.property, ImageTagProperties.tagid  FROM Images      
INNER JOIN ImageTagProperties ON ImageTagProperties.imageid=Images.id      
LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid      
INNER JOIN Albums           ON Albums.id=Images.album WHERE Images.status=1
AND (  ( ( (ImageTagProperties.tagid=49 OR ImageTagProperties.tagid IN
(SELECT id FROM TagsTree WHERE pid=49)) AND
ImageTagProperties.property='autodetectedPerson'  ) OR (
(ImageTagProperties.tagid=49 OR ImageTagProperties.tagid IN (SELECT id FROM
TagsTree WHERE pid=49)) AND ImageTagProperties.property='autodetectedFace'
) OR ( (ImageTagProperties.tagid=49 OR ImageTagProperties.tagid IN (SELECT
id FROM TagsTree WHERE pid=49)) AND ImageTagProperties.property='tagRegion'
) )  );
>ERROR 1449 (HY000): The user specified as a definer ('omame'@'localhost')
does not exist

OK, now we're getting somewhere.
When I set up the mysql connection I used a personal user to configure the
digikam connection. Then, in a later iteration, I created a dedicated
digikam user and dropped the previous one.
But where is this defined? It must be somewhere in the schema, so I dumped
it and had a look:

>[...]
>--
>-- Final view structure for view `tagstree`
>--
>
>/*!50001 DROP TABLE IF EXISTS `tagstree`*/;
>/*!50001 DROP VIEW IF EXISTS `tagstree`*/;
>/*!50001 SET @saved_cs_client          = @@character_set_client */;
>/*!50001 SET @saved_cs_results         = @@character_set_results */;
>/*!50001 SET @saved_col_connection     = @@collation_connection */;
>/*!50001 SET character_set_client      = utf8mb4 */;
>/*!50001 SET character_set_results     = utf8mb4 */;
>/*!50001 SET collation_connection      = utf8mb4_general_ci */;
>/*!50001 CREATE ALGORITHM=UNDEFINED */
>/*!50013 DEFINER=`omame`@`localhost` SQL SECURITY DEFINER */

There you are! Apparently something didn't get updated in the schema when I
switched to the new user. Here's the view:

>mariadb> show create view digikam.tagstree;
>+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>| View     | Create View                                                                                                                                                                                        
| character_set_client | collation_connection |
>+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>| tagstree | CREATE ALGORITHM=UNDEFINED DEFINER=`omame`@`localhost` SQL
SECURITY DEFINER VIEW `digikam`.`tagstree` AS select `digikam`.`tags`.`id`
AS `id`,`digikam`.`tags`.`pid` AS `pid` from `digikam`.`tags` | utf8mb4            
| utf8mb4_general_ci   |
>+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>1 row in set, 1 warning (0.000 sec)

So I simply dropeed and recreated the view:

>mariadb> drop view digikam.tagstree;
>Query OK, 0 rows affected (0.006 sec)
>
>mariadb> CREATE ALGORITHM=UNDEFINED DEFINER=`digikam`@`localhost` SQL
SECURITY DEFINER VIEW `digikam`.`tagstree` AS select `digikam`.`tags`.`id`
AS `id`,`digikam`.`tags`.`pid` AS `pid` from `digikam`.`tags`;
>Query OK, 0 rows affected (0.020 sec)
>
>mariadb> show create view digikam.tagstree;
>+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>| View     | Create View                                                                                                                                                  
| character_set_client | collation_connection |
>+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>| tagstree | CREATE ALGORITHM=UNDEFINED DEFINER=`digikam`@`localhost` SQL
SECURITY DEFINER VIEW `tagstree` AS select `tags`.`id` AS `id`,`tags`.`pid`
AS `pid` from `tags` | utf8                 | utf8_general_ci      |
>+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
>1 row in set (0.001 sec)

And voilà: people view works!

Is there a way for digikam to handle this tiny "migration" when the users
gets updated in the preferences? Or perhaps it's worth mentioning in the
docs, unless it's already there and I completely missed it?



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html