nextcloud / files_fulltextsearch_tesseract

OCR your documents before index
GNU Affero General Public License v3.0
30 stars 13 forks source link

Error! The command "" was not found. #34

Closed prolibre closed 3 years ago

prolibre commented 3 years ago

Hello,

Nextcloud 20.0.4 files_fulltextsearch_tesseract 20.0.1

It hasn't worked for a while (I'm not sure anymore). Of course tessaract is installed on my machine and it worked very well. I am surprised by the empty command in : Error! The command "" was not found.

Here are my logs:

{"reqId":"EvFIwwPPicpCuO4U0fWn","level":1,"time":"2020-12-17T12:02:29+00:00","remoteAddr":"","user":"--","app":"files_fulltextsearch_tesseract","method":"","url":"--","message":{"Exception":"thiagoalessio\\TesseractOCR\\TesseractNotFoundException","Message":"Error! The command \"\" was not found.\n\nMake sure you have Tesseract OCR installed on your system:\nhttps://github.com/tesseract-ocr/tesseract\n\nThe current $PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/vendor/thiagoalessio/tesseract_ocr/src/TesseractOCR.php","line":26,"function":"checkTesseractPresence","class":"thiagoalessio\\TesseractOCR\\FriendlyErrors","type":"::"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":217,"function":"run","class":"thiagoalessio\\TesseractOCR\\TesseractOCR","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":194,"function":"ocrFileFromPath","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":169,"function":"ocrFile","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/lib/Service/TesseractService.php","line":121,"function":"extractContentUsingTesseractOCR","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/lib/Listeners/GenericListener.php","line":84,"function":"onFileIndexing","class":"OCA\\Files_FullTextSearch_Tesseract\\Service\\TesseractService","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\Files_FullTextSearch_Tesseract\\Listeners\\GenericListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ExtensionService.php","line":123,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/ExtensionService.php","line":90,"function":"dispatch","class":"OCA\\Files_FullTextSearch\\Service\\ExtensionService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php","line":713,"function":"fileIndexing","class":"OCA\\Files_FullTextSearch\\Service\\ExtensionService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php","line":658,"function":"updateContentFromFile","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php","line":573,"function":"updateFilesDocumentFromFile","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php","line":621,"function":"generateDocumentFromIndex","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->"},{"file":"/var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php","line":291,"function":"updateDocument","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php","line":407,"function":"updateDocument","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php","line":308,"function":"updateDocument","class":"OCA\\FullTextSearch\\Service\\IndexService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/fulltextsearch/lib/Command/Live.php","line":261,"function":"liveCycle","class":"OCA\\FullTextSearch\\Command\\Live","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php","line":258,"function":"execute","class":"OCA\\FullTextSearch\\Command\\Live","type":"->"},{"file":"/var/www/nextcloud/core/Command/Base.php","line":169,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":920,"function":"run","class":"OC\\Core\\Command\\Base","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":266,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/apps/mail/vendor/symfony/console/Application.php","line":142,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/nextcloud/occ","line":11,"args":["/var/www/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/files_fulltextsearch_tesseract/vendor/thiagoalessio/tesseract_ocr/src/FriendlyErrors.php","Line":48,"CustomMessage":"{\"path\":\"\\/DIR\\/nextcloud\\/data\\/DIR\\/USER\\/DIR\\/FILE.jpg\",\"cmd\":\"\\\"tesseract\\\" \\\"\\/DIR\\/data\\/DIR\\/files\\/USER\\/DIR\\/FILE.jpg\\\" \\\"\\/tmp\\/ocrccbv8n\\\" --psm 3 -l fra 2> \\/dev\\/null\",\"lang\":[\"fra\"]}"},"userAgent":"--","version":"20.0.3.2"}

Davr3n commented 3 years ago

I had this issue too and it was resolved by "occ fulltextsearch:reset" and then "occ fulltextsearch:test". Keep in mind that this will remove the current index and you will need to :index again.

prolibre commented 3 years ago

@Davr3n Thank you very much, it looks like it's working... here we go for several hours of indexing and I see that tessaract is in my processes ! :-)