facerecognition icon indicating copy to clipboard operation
facerecognition copied to clipboard

Crashes with TypeError: OCA\FaceRecognition\Helper\Euclidean::distance(): Argument #1 ($vector1) must be of type array, string given, called in

Open wojciechczyz opened this issue 4 months ago • 0 comments

Hey, Thanks for reporting issues back to Nextcloud Face Recognition. Please, try to complete this report in detail so we can help you easier. :smile:

Make sure you read all the documentation, and the FAQ, and that the issue has not been reported before. :wink:

Expected behaviour

when running:

php occ face:background_job --cluster-mode

It starts clustering and then crashes: 1/3 - Executing task CheckRequirementsTask (Check all requirements) 2/3 - Executing task CheckCronTask (Check that service is started from either cron or from command) 3/3 - Executing task CreateClustersTask (Create new persons or update existing persons) Face clustering will be created for the first time. There are 47 faces for clustering An unhandled exception has been thrown:

Actual behaviour

Crashes with error: 42b5095134e3:/var/www/html$ php occ face:background_job --cluster-mode 1/3 - Executing task CheckRequirementsTask (Check all requirements) 2/3 - Executing task CheckCronTask (Check that service is started from either cron or from command) 3/3 - Executing task CreateClustersTask (Create new persons or update existing persons) Face clustering will be created for the first time. There are 47 faces for clustering An unhandled exception has been thrown: TypeError: OCA\FaceRecognition\Helper\Euclidean::distance(): Argument #1 ($vector1) must be of type array, string given, called in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php on line 336 and defined in /var/www/html/custom_apps/facerecognition/lib/Helper/Euclidean.php:24 Stack trace: #0 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(336): OCA\FaceRecognition\Helper\Euclidean::distance('[-0.08935702592...', '[-0.08935702592...') #1 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(177): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->getNewClusters(Array) #2 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(90): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->createClusterIfNeeded('admin') #3 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/BackgroundService.php(150): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->execute(Object(OCA\FaceRecognition\BackgroundJob\FaceRecognitionContext)) #4 /var/www/html/custom_apps/facerecognition/lib/Command/BackgroundCommand.php(192): OCA\FaceRecognition\BackgroundJob\BackgroundService->execute(0, false, NULL, NULL, 'cluster-mode') #5 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\FaceRecognition\Command\BackgroundCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FaceRecognition\Command\BackgroundCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/console.php(102): OC\Console\Application->run() #11 /var/www/html/occ(11): require_once('/var/www/html/c...') #12 {main}42b5095134e3:/var/www/html$

Server configuration

  • Operating system:

docker setup with external container

  • Pdlib version:

  • How is DLib installed: Make sure it is working correctly with this tool

docker setup with external container

  • How is PDlib installed: Make sure it is working correctly with this tool

  • PHP version:

  • Web server:

  • Database:

  • Nextcloud version:

29.0.8

Client configuration

  • Browser:

Chrome

  • Operating system:

Docker under Proxmox

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job
1/8 - Executing task CheckRequirementsTask (Check all requirements)        System: Linux
        System memory: 33227206656        PHP Memory Limit: 2147483648        Clustering backend: PHP (Not recommended.)
        Image Backend: Imaginary        Imaginary version: dev
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
yielding
yielding
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
        Skipping stale images removal for user admin as there is no need for it
        Skipping stale images removal for user wojtek as there is no need for it
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
        Face clustering will be created for the first time.
        There are 47 faces for clustering
        We will cluster with 1 batch(es) of 47 faces
An unhandled exception has been thrown:
TypeError: OCA\FaceRecognition\Helper\Euclidean::distance(): Argument #1 ($vector1) must be of type array, string given, called in /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php on line 336 and defined in /var/www/html/custom_apps/facerecognition/lib/Helper/Euclidean.php:24
Stack trace:
#0 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(336): OCA\FaceRecognition\Helper\Euclidean::distance('[-0.08935702592...', '[-0.08935702592...')
#1 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(177): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->getNewClusters(Array)
#2 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/Tasks/CreateClustersTask.php(90): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->createClusterIfNeeded('admin')
#3 /var/www/html/custom_apps/facerecognition/lib/BackgroundJob/BackgroundService.php(150): OCA\FaceRecognition\BackgroundJob\Tasks\CreateClustersTask->execute(Object(OCA\FaceRecognition\BackgroundJob\FaceRecognitionContext))
#4 /var/www/html/custom_apps/facerecognition/lib/Command/BackgroundCommand.php(192): OCA\FaceRecognition\BackgroundJob\BackgroundService->execute(0, true, NULL, NULL, 'default-mode')
#5 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OCA\FaceRecognition\Command\BackgroundCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FaceRecognition\Command\BackgroundCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/console.php(102): OC\Console\Application->run()
#11 /var/www/html/occ(11): require_once('/var/www/html/c...')
42b

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

wojciechczyz avatar Oct 17 '24 07:10 wojciechczyz