Discussion:
[Mayan EDMS: 2526] Re: Document_Analyzer errors, not analyzing
Matthias Löblich
2018-06-10 08:39:32 UTC
Permalink
Hi,
path to exiftool is hardcoded to:

EXIFTOOL_PATH = '/usr/bin/exiftool'


Do an:
"which exiftool"

if it is not '/usr/bin/exiftool', create an link from /usr/bin/

....
I will make it configurable in a future release.

br
Matthias
Hi,
finally got document_analyzer working with the help of the awesome
Matthias L. Thanks a lot! (may need you magic again ... :( )
I configured some test entries in the analyzer (one is from the README),
none are working. I can execute the exiftool in command line against a file
and I get results. The test files (all png) were added via a watch folder.
exiftool 0c8eeff2-727f-4cf9-8ebf-88ea376f5676
ExifTool Version Number : 11.00
File Name : 0c8eeff2-727f-4cf9-8ebf-88ea376f5676
Directory : .
File Size : 486 kB
File Modification Date/Time : 2018:06:08 17:26:46+00:00
File Access Date/Time : 2018:06:08 17:26:46+00:00
File Inode Change Date/Time : 2018:06:08 17:26:46+00:00
File Permissions : rw-r--r--
File Type : PNG
File Type Extension : png
MIME Type : image/png
Image Width : 2550
Image Height : 3300
Bit Depth : 8
Color Type : Palette
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Palette : (Binary data 768 bytes, use -b option to
extract)
Pixels Per Unit X : 11811
Pixels Per Unit Y : 11811
Pixel Units : meters
*Modify Date* : *2015:05:15 15:53:00*
Image Size : 2550x3300
Megapixels : 8.4
(Site Note: I am after the Modify Date ...)
<Loading Image...>
<Loading Image...>
[2018-06-08 17:44:40,173: ERROR/Worker-4] Analyzer error for document
version: 6; [Errno 2] No such file or directory
document_analyzer.tasks <7768> [ERROR] "task_do_analyze() line 57 Analyzer
error for document version: 3; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,173: ERROR/Worker-5] Analyzer error for document
version: 3; [Errno 2] No such file or directory
document_analyzer.tasks <7780> [ERROR] "task_do_analyze() line 57 Analyzer
error for document version: 4; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,184: ERROR/Worker-16] Analyzer error for document
version: 4; [Errno 2] No such file or directory
document_analyzer.tasks <7765> [ERROR] "task_do_analyze() line 57 Analyzer
error for document version: 5; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,186: ERROR/Worker-2] Analyzer error for document
version: 5; [Errno 2] No such file or directory
document_analyzer.tasks <7769> [ERROR] "task_do_analyze() line 57 Analyzer
error for document version: 1; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,192: ERROR/Worker-6] Analyzer error for document
version: 1; [Errno 2] No such file or directory
document_analyzer.tasks <7774> [ERROR] "task_do_analyze() line 57 Analyzer
error for document version: 2; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,213: ERROR/Worker-10] Analyzer error for document
version: 2; [Errno 2] No such file or directory
I also tried adding a file by adding it thru the web interface instead of
the watch folder and I get some additional error messages in the
[2018-06-08 17:58:43,169: ERROR/MainProcess] Task
ocr.tasks.task_do_ocr[98676882-dd20-4536-bc5c-ef154a9c8a26] raised
unexpected: OSError(2, 'No such file or directory')
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py",
line 240, in trace_task
R = retval = fun(*args, **kwargs)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py",
line 438, in __protected_call__
return self.run(*args, **kwargs)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/tasks.py",
line 43, in task_do_ocr
document_version=document_version
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/managers.py",
line 56, in process_document_version
sender=document_version.__class__, instance=document_version
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
line 191, in send
response = receiver(signal=self, sender=sender, **named)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/handlers.py",
line 12, in analyze_document
Result.objects.process_version(document_version=instance)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/managers.py",
line 21, in process_version
result = backend.execute(document_version=document_version,
parameter=analyzer.parameter)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/backends/exiftool.py",
line 22, in execute
result = subprocess.check_output([EXIFTOOL_PATH, '-j', temp_filename])
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any suggestions on what I did wrong?
Thanks a lot!
PS: Sorry that I am a bit of a pain in the neck, but I really need this to
work to save days of manual work ...
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eddi
2018-06-10 17:14:46 UTC
Permalink
This did the trick!!! It’s working now.

THANK YOU Matthias!!

Eddi
Post by Matthias Löblich
Hi,
EXIFTOOL_PATH = '/usr/bin/exiftool'
"which exiftool"
if it is not '/usr/bin/exiftool', create an link from /usr/bin/
....
I will make it configurable in a future release.
br
Matthias
Hi,
finally got document_analyzer working with the help of the awesome Matthias L. Thanks a lot! (may need you magic again ... :( )
I configured some test entries in the analyzer (one is from the README), none are working. I can execute the exiftool in command line against a file and I get results. The test files (all png) were added via a watch folder.
ExifTool Version Number : 11.00
File Name : 0c8eeff2-727f-4cf9-8ebf-88ea376f5676
Directory : .
File Size : 486 kB
File Modification Date/Time : 2018:06:08 17:26:46+00:00
File Access Date/Time : 2018:06:08 17:26:46+00:00
File Inode Change Date/Time : 2018:06:08 17:26:46+00:00
File Permissions : rw-r--r--
File Type : PNG
File Type Extension : png
MIME Type : image/png
Image Width : 2550
Image Height : 3300
Bit Depth : 8
Color Type : Palette
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Palette : (Binary data 768 bytes, use -b option to extract)
Pixels Per Unit X : 11811
Pixels Per Unit Y : 11811
Pixel Units : meters
Modify Date : 2015:05:15 15:53:00
Image Size : 2550x3300
Megapixels : 8.4
(Site Note: I am after the Modify Date ...)
[2018-06-08 17:44:40,173: ERROR/Worker-4] Analyzer error for document version: 6; [Errno 2] No such file or directory
document_analyzer.tasks <7768> [ERROR] "task_do_analyze() line 57 Analyzer error for document version: 3; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,173: ERROR/Worker-5] Analyzer error for document version: 3; [Errno 2] No such file or directory
document_analyzer.tasks <7780> [ERROR] "task_do_analyze() line 57 Analyzer error for document version: 4; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,184: ERROR/Worker-16] Analyzer error for document version: 4; [Errno 2] No such file or directory
document_analyzer.tasks <7765> [ERROR] "task_do_analyze() line 57 Analyzer error for document version: 5; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,186: ERROR/Worker-2] Analyzer error for document version: 5; [Errno 2] No such file or directory
document_analyzer.tasks <7769> [ERROR] "task_do_analyze() line 57 Analyzer error for document version: 1; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,192: ERROR/Worker-6] Analyzer error for document version: 1; [Errno 2] No such file or directory
document_analyzer.tasks <7774> [ERROR] "task_do_analyze() line 57 Analyzer error for document version: 2; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,213: ERROR/Worker-10] Analyzer error for document version: 2; [Errno 2] No such file or directory
[2018-06-08 17:58:43,169: ERROR/MainProcess] Task ocr.tasks.task_do_ocr[98676882-dd20-4536-bc5c-ef154a9c8a26] raised unexpected: OSError(2, 'No such file or directory')
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/tasks.py", line 43, in task_do_ocr
document_version=document_version
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/managers.py", line 56, in process_document_version
sender=document_version.__class__, instance=document_version
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 191, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/handlers.py", line 12, in analyze_document
Result.objects.process_version(document_version=instance)
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/managers.py", line 21, in process_version
result = backend.execute(document_version=document_version, parameter=analyzer.parameter)
File "/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/backends/exiftool.py", line 22, in execute
result = subprocess.check_output([EXIFTOOL_PATH, '-j', temp_filename])
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any suggestions on what I did wrong?
Thanks a lot!
PS: Sorry that I am a bit of a pain in the neck, but I really need this to work to save days of manual work ...
--
---
You received this message because you are subscribed to a topic in the Google Groups "Mayan EDMS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mayan-edms/IWaT7eCgDkE/unsubscribe.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-06-10 17:52:47 UTC
Permalink
Mathias now has developer access to the document analyzer fork in the Mayan
EDMS organization in GitLab and will be keeping both repositoties
synchronized for the benefit of all. Thank you.
Post by Eddi
This did the trick!!! It’s working now.
THANK YOU Matthias!!
Eddi
Hi,
EXIFTOOL_PATH = '/usr/bin/exiftool'
"which exiftool"
if it is not '/usr/bin/exiftool', create an link from /usr/bin/
....
I will make it configurable in a future release.
br
Matthias
Hi,
finally got document_analyzer working with the help of the awesome
Matthias L. Thanks a lot! (may need you magic again ... :( )
I configured some test entries in the analyzer (one is from the README),
none are working. I can execute the exiftool in command line against a file
and I get results. The test files (all png) were added via a watch folder.
exiftool 0c8eeff2-727f-4cf9-8ebf-88ea376f5676
ExifTool Version Number : 11.00
File Name : 0c8eeff2-727f-4cf9-8ebf-88ea376f5676
Directory : .
File Size : 486 kB
File Modification Date/Time : 2018:06:08 17:26:46+00:00
File Access Date/Time : 2018:06:08 17:26:46+00:00
File Inode Change Date/Time : 2018:06:08 17:26:46+00:00
File Permissions : rw-r--r--
File Type : PNG
File Type Extension : png
MIME Type : image/png
Image Width : 2550
Image Height : 3300
Bit Depth : 8
Color Type : Palette
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Palette : (Binary data 768 bytes, use -b option to extract)
Pixels Per Unit X : 11811
Pixels Per Unit Y : 11811
Pixel Units : meters
*Modify Date* : *2015:05:15 15:53:00*
Image Size : 2550x3300
Megapixels : 8.4
(Site Note: I am after the Modify Date ...)
<https://lh3.googleusercontent.com/-K__gkoXYHbI/WxrBk0GWxGI/AAAAAAAAHEw/K2HZ5d_QKMcNaEl9opgr5kUv6EWIaIZzACLcBGAs/s1600/Analyzers.png>
<https://lh3.googleusercontent.com/-XpuptxBXe3M/WxrB1aZzbZI/AAAAAAAAHE4/sErXLgAO4bQ1ok4ykBuk3MJnnFwcaOoawCLcBGAs/s1600/Results.png>
[2018-06-08 17:44:40,173: ERROR/Worker-4] Analyzer error for document
version: 6; [Errno 2] No such file or directory
document_analyzer.tasks <7768> [ERROR] "task_do_analyze() line 57
Analyzer error for document version: 3; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,173: ERROR/Worker-5] Analyzer error for document
version: 3; [Errno 2] No such file or directory
document_analyzer.tasks <7780> [ERROR] "task_do_analyze() line 57
Analyzer error for document version: 4; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,184: ERROR/Worker-16] Analyzer error for document
version: 4; [Errno 2] No such file or directory
document_analyzer.tasks <7765> [ERROR] "task_do_analyze() line 57
Analyzer error for document version: 5; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,186: ERROR/Worker-2] Analyzer error for document
version: 5; [Errno 2] No such file or directory
document_analyzer.tasks <7769> [ERROR] "task_do_analyze() line 57
Analyzer error for document version: 1; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,192: ERROR/Worker-6] Analyzer error for document
version: 1; [Errno 2] No such file or directory
document_analyzer.tasks <7774> [ERROR] "task_do_analyze() line 57
Analyzer error for document version: 2; [Errno 2] No such file or directory"
[2018-06-08 17:44:40,213: ERROR/Worker-10] Analyzer error for document
version: 2; [Errno 2] No such file or directory
I also tried adding a file by adding it thru the web interface instead of
the watch folder and I get some additional error messages in the
[2018-06-08 17:58:43,169: ERROR/MainProcess] Task
ocr.tasks.task_do_ocr[98676882-dd20-4536-bc5c-ef154a9c8a26] raised
unexpected: OSError(2, 'No such file or directory')
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py",
line 240, in trace_task
R = retval = fun(*args, **kwargs)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/celery/app/trace.py",
line 438, in __protected_call__
return self.run(*args, **kwargs)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/tasks.py",
line 43, in task_do_ocr
document_version=document_version
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/ocr/managers.py",
line 56, in process_document_version
sender=document_version.__class__, instance=document_version
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
line 191, in send
response = receiver(signal=self, sender=sender, **named)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/handlers.py",
line 12, in analyze_document
Result.objects.process_version(document_version=instance)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/managers.py",
line 21, in process_version
result = backend.execute(document_version=document_version,
parameter=analyzer.parameter)
File
"/usr/share/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/document_analyzer/backends/exiftool.py",
line 22, in execute
result = subprocess.check_output([EXIFTOOL_PATH, '-j', temp_filename])
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any suggestions on what I did wrong?
Thanks a lot!
PS: Sorry that I am a bit of a pain in the neck, but I really need this
to work to save days of manual work ...
--
---
You received this message because you are subscribed to a topic in the
Google Groups "Mayan EDMS" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/mayan-edms/IWaT7eCgDkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...