Bug #1018

Update FITS to 0.4.3.

Added by Courtney Mumma over 10 years ago. Updated almost 9 years ago.

Status:VerifiedStart date:
Priority:CriticalDue date:
Assignee:Austin Trask% Done:

0%

Category:-
Target version:Release 0.7
Google Code Legacy ID:archivematica-363 Pull Request:
Sponsored: Requires documentation:

Description

SIP of raw photos (Cannon .CR2) failed at Characterize and Extract microservice –
Each fits log stated the following: Traceback (most recent call last):
File "/usr/lib/archivematica/MCPClient/clientScripts/archivematicaFITS.py", line 220, in <module>
fits = excludeJhoveProperties(fits)
File "/usr/lib/archivematica/MCPClient/clientScripts/archivematicaFITS.py", line 48, in excludeJhoveProperties
repInfo = getTagged(formatValidation, "repInfo")[0]
File "/usr/src/archivematica/src/MCPClient/lib/clientScripts/archivematicaFunctions.py", line 29, in getTagged
for element in root:
TypeError: 'NoneType' object is not iterable”

[g] Legacy categories: FITS

cbdc50a4-cc90-459d-b12f-e23ac3da4fb7.xml Magnifier (37.7 KB) Courtney Mumma, 11/30/2012 05:05 PM

cr2FitsOutput.txt Magnifier (34.6 KB) Joseph Perry, 11/30/2012 05:05 PM

History

#1 Updated by Joseph Perry over 10 years ago

I'm hoping you could run fits on that file, and send me a copy of the output.
I'd like to have a look at it.

The problem lies in the python code parsing the FITS data.

[g] New owner: Joseph Perry

#2 Updated by Joseph Perry over 10 years ago

Tried to reproduce without success with a sample file I found online:
http://www.lasvegastech.com/IMG_3350.CR2

#3 Updated by Courtney Mumma over 10 years ago

Here you go, Joseph. I ran that file through Archivematica just far enough to produce the FITS report attached.

#4 Updated by Joseph Perry over 10 years ago

The fits output you've provided doesn't match the error.

The error indicates the entire Jhove section is missing, but I can see it's there:
<tool name="Jhove" version="1.5">
<repInfo uri="/var/archivematica/sharedDirectory/.currentlyProcessing/d0a7fdee-f129-488d-94b7-5c9470cbc6ad/RawImageIssue363-ac4c1ab9-b301-4a74-981d-7a2993a6969a/objects/IMG_3350.CR2">
<reportingModule release="1.5" date="2007-10-02">TIFF-hul</reportingModule>
<lastModified>2011-01-18T13:30:34-08:00</lastModified>
<size>6725536</size>
<format>TIFF</format>
<status>Not well-formed</status>
<sigMatch>
<module>TIFF-hul</module>
</sigMatch>
<messages>
<message severity="error">IFD offset not word-aligned: 222615</message>
</messages>
<mimeType>image/tiff</mimeType>
</repInfo>
</tool>

Also, archivematica wouldn't place the FITS information in the file if the fits step fails fails.
To get the fits output on the file, you'd need to run fits on the file outside of archivematica. ie.
fits.sh -i objects/IMG_3350.CR2
Although, I suspect IMG_3350.CR2 wasn't the file to cause this error in the first place.

#5 Updated by Joseph Perry over 10 years ago

Will need to open a ticket for FITS/Jhove about this issue.
Fits is outputting the following to standard error.

Error on line 23 of jhove_image_to_fits.xslt:
XPTY0004: A sequence of more than one item is not allowed as the first argument of
replace() ("little-endian", "little-endian", ...)
Warning: Jhove: Error converting output using /usr/share/fits/xml/jhove/jhove_image_to_fits.xslt (A sequence of more than one item is not allowed as the first argument of replace() ("little-endian", "little-endian", ...) )

#6 Updated by Joseph Perry over 10 years ago

Attached is the Fits standard out.

#7 Updated by Joseph Perry over 10 years ago

Created Issue on Fits's google code repository.
http://code.google.com/p/fits/issues/detail?id=18

#8 Updated by Joseph Perry over 10 years ago

Got same error on a different file.

evelyn@dell-desktop:~/Desktop$ fits.sh -i 61149.tif > 61149.xml
Error on line 23 of jhove_image_to_fits.xslt:
XPTY0004: A sequence of more than one item is not allowed as the first
argument of
replace() ("little-endian", "little-endian", ...)
Warning: Jhove: Error converting output using
/usr/share/fits/xml/jhove/jhove_image_to_fits.xslt (A sequence of more
than one item is not allowed as the first argument of replace()
("little-endian", "little-endian", ...) )

#9 Updated by Joseph Perry over 10 years ago

It appears fits requires an update.
It appears we need to update our version of fits.

http://code.google.com/p/fits/issues/detail?id=18

"I'm able to reproduce your error with a multipage tif in FITS 0.4.2. I don't see the error when I run the same file through 0.4.3. I suspect the problem is with the XSLT that transforms the Jhove output into the FITS normalized format. Comparing the 0.4.2 XSLT with the version with 0.4.3 I do see a change to the way the <byteOrder> element is handled. I also suspect it's the same problem with the CR2 file, or any others that output the same element multiple times. "

[g] New owner: Austin Trask

#10 Updated by Evelyn McLellan over 10 years ago

  • Subject set to Update FITS to 0.4.3.
  • Priority changed from Medium to Critical

Am changing title and upgrading to critical.

[g] Labels added: Priority-Critical
[g] Labels removed: Priority-Medium, Component-Ingest

#11 Updated by Evelyn McLellan over 10 years ago

  • Status changed from New to Verified

Fixed. Update to 0.4.3 prevented the error originally reported in this issue.

Also available in: Atom PDF