Author Topic: csv import issue  (Read 584 times)

DMarsat

  • Newbie
  • *
  • Posts: 6
csv import issue
« on: July 09, 2019, 03:55:16 AM »
Hello,

I've recently started using ExifTool. I only aim to use it for something very simple, yet something is wrong.

I currently have a folder of several thousands pictures with no GPS coordinates. I also have a .csv file with GPS coordinates for each picture with the first column being decicaded to "SourceFile" as per the FAQ's instruction.

So what I want to do is take the data of the CSV and put it in the picture folders. I've added to each picture the following tags :
- GPSAltitude
- GPSAltitudeRef
- GPSLatitude
- GPSLatitudeRef
- GPSLongitude
- GPSLongitudeRef

Yet, when I use the exiftool -csv= command, the same error message appears (here an example with only one picture called)
 "exiftool -csv="XXX.csv" "XXX_00001.jpg"
Invalid tag name 'SourceFile;GPSAltitude;GPSAltitudeRef;GPSLatitude;GPSLatitudeRef;GPSLongitude;GPSLongitudeRef' in CSV file
No SourceFile 'XXX_00001.jpg' in imported CSV database"

The sourcefile is here in the csv and completely correct, yet it still doesn't work.Is this a common mistake ?

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #1 on: July 09, 2019, 04:10:41 AM »
Is the CSV comma separated or semicolon separated? In the latter case, make sure you replace the semicolons by commas. That should fix it.

P.S. you posted this as reply to an existing post instead of creating a new post. I fixed this by splitting it off into a separate subject :)
Hayo Baan – Photography
Web: www.hayobaan.nl

DMarsat

  • Newbie
  • *
  • Posts: 6
Re: csv import issue
« Reply #2 on: July 09, 2019, 04:16:43 AM »
Thank you. I use commas to separate the CSV data. In fact the CSV I'm using was produced by the csv command in exiftool, so it shouldn't have any reason to not find or recognize the tags it produced itself.

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #3 on: July 09, 2019, 04:31:48 AM »
Can you share (part of) the csv file so we can have a look? Also, how did you generate the csv file (what was the exiftool command)?
Hayo Baan – Photography
Web: www.hayobaan.nl

DMarsat

  • Newbie
  • *
  • Posts: 6
Re: csv import issue
« Reply #4 on: July 09, 2019, 04:43:34 AM »
Here's the csv file I want to import in my image folder.



To generate the "original" csv file, which I used to get the SourceFile column, I simply used the command described in the FAQ : exiftool -csv "c:\Users\Phil\Images" > "c:\Users\Phil\test.csv"


Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #5 on: July 09, 2019, 04:47:16 AM »
The attachment did not show up, can you retry?
Hayo Baan – Photography
Web: www.hayobaan.nl

DMarsat

  • Newbie
  • *
  • Posts: 6
Re: csv import issue
« Reply #6 on: July 09, 2019, 04:53:04 AM »
Here is the picture again :

Quote
And a more direct link if it doesn't show up (looks fine on my computer).
https://cdn1.imggmi.com/uploads/2019/7/9/6c31864817a1b03bda556a19d665ded3-full.png


Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #7 on: July 09, 2019, 05:00:42 AM »
No, I don't want a picture (certainly not of the file in a spreadsheet program), I need the actual .csv file. That's the only way I can verify the format is correct...

That said, from the picture I can already tell it's trying to look for files in T:/Time/Sam..., not for bare files “XXX_00001.jpg” the files must match exactly, are you doing that?
Hayo Baan – Photography
Web: www.hayobaan.nl

DMarsat

  • Newbie
  • *
  • Posts: 6
Re: csv import issue
« Reply #8 on: July 09, 2019, 05:07:32 AM »
I apologize for the misunderstanding. Here is a direct download link.

https://we.tl/t-1v8rlrBiea

Yes, the Sourcefile references individual image files.

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #9 on: July 09, 2019, 05:14:38 AM »
Got the file :)

And as I expected, it's not separated by commas but by semi-colons. I guess you edited it in e.g. excel and then saved it again? I've changed the semi-colons by commas in attached file (if you want, I can remove the file after you are done with it).
Hayo Baan – Photography
Web: www.hayobaan.nl

DMarsat

  • Newbie
  • *
  • Posts: 6
Re: csv import issue
« Reply #10 on: July 09, 2019, 05:19:19 AM »
Thank you, this seem to have worked ! I suppose I was confused by the CSV file's separation.

You do not need to remove the file, it's not important in itself and it could help someone with a similar problem.

Regards,

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: csv import issue
« Reply #11 on: July 09, 2019, 05:41:07 AM »
Glad it's solved :)
Hayo Baan – Photography
Web: www.hayobaan.nl