No SourceFile '' in imported JSON database

Started by Kjell Moens, July 27, 2017, 04:08:22 AM

Previous topic - Next topic

Kjell Moens

Hi,

I am trying to invoke exiftool with the -json option from within a java application.
I am getting the following error :

[exiftool] Using ExifTool in non-daemon mode (-stay_open False)...
[exiftool] D:\\dev_home\\tools\\exiftool.exe -json=d:/dev_home/source/be/thebaseline/projects/picture-processor/src/test/resources/dmim_20160903121245_99_3159x4891_e94c982f8fff79ead88829418f3255df.jpg.faces.json d:/dev_home/source/be/thebaseline/projects/picture-processor/src/test/resources/dmim_20160903121245_99_3159x4891_e94c982f8fff79ead88829418f3255df.jpg
No SourceFile 'd:/dev_home/source/be/thebaseline/projects/picture-processor/src/test/resources/dmim_20160903121245_99_3159x4891_e94c982f8fff79ead88829418f3255df.jpg' in imported JSON database

I already played around with the path names (replace the slashes by backslashes, removing the path, lowercase, ...) but i keep on getting the error.
Can someone help me ?
I am also including the contents of the json file.


[{
"SourceFile":"dmim_20160903121245_99_3159x4891_e94c982f8fff79ead88829418f3255df.jpg",
"RegionName":"Marielisa Bajana, Agnes, David, Wolfie, Kjell Moens, Camille Gutton, Auke van Drimmelen, Patrick Baillie",
"RegionAreaUnit":"normalized, normalized, normalized, normalized, normalized, normalized, normalized, normalized",
"RegionAreaX":[0.52504766, 0.23369192, 0.7049668, 0.8055543, 0.5, 0.7399252, 0.25189593, 0.30443275],
"RegionAreaY":[0.17030594, 0.23709469, 0.20006104, 0.14877546, 0.6, 0.20006104, 0.18486305, 0.2010071],
"RegionAreaW":[0.5867857, 0.26681927, 0.72930497, 0.8437934, 0.7, 0.77059585, 0.285008, 0.33571374],
"RegionAreaH":[0.28522164, 0.29883268, 0.24469368, 0.21968414, 0.8, 0.25735867, 0.24660106, 0.25830472]
}]


Thank you



Phil Harvey

You should "cd" to the directory containing the images before running the command since the SourceFile entries in your JSON file don't have a path specification.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Kjell Moens

Hi Phil,

Thank you for your answer. This indeed solved (partially) the problem.
Another thing i noticed is, that if you forget a comma at the end of the line, exiftool will also throw the same sourceFile error. Just to let you know.

And thank you for providing a great tool ...

Kjell

Phil Harvey

Hi Kjell,

No comma is necessary at the end of the line.

> exiftool a.jpg -csv -filetype
SourceFile,FileType
a.jpg,JPEG


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).