Importing CSV file, names are not imported

I installed GRAMPS again (after 4 years) to open/import an old CSV file (exported in april 2019) and every name, even though names are recorded in that file, they don’t appear when imported.

  • I created a tree
  • Loaded that tree
  • Went to “Arboles genealógicos” (I don’t know how it is in english)
  • Click in “Importar” (“Import”).
  • I selected the CSV file
  • Everything seems to be right, but names are empties.


(where it says “Sottile, Ezequiel”, the name “Ezequiel” was recorded as “sufix”… I don’t remember why I did it, I think I did it wrong. “Ezequiel” is my second name).

Here is the CSV file, it seems not to be corrupted. Fields (or columns) are in spanish: Gramps CSV file - Pastebin.com

Is this a bug or there is something that I am missing?

Looking at the CSV file I notice the column titles are not in English not sure that has an impact but are you running Gramps in the same Language the CSV file was saved in?

Lugar,Título,Nombre,Tipo,Latitud,Longitud,Code,Enclosed_by,Fecha

[P0000],Italia,País,

Persona,Apellido,Nombre,Corto,Sufijo,Prefijo,Tratamiento,Sexo,Fecha de nacimiento,Lugar de nacimiento,Fuente para nacimiento,Fecha de bautismo,Lugar de bautismo,Fuente para el bautismo,Fecha de defunción,Lugar de defunción,Fuente para la defunción,Fecha de entierro,Lugar del entierro,Fuente para el entierro,Nota

[I0042],?,desconocido,

Yes. The differences between the time I created that file and now are:

  • 4 years
  • Gramps version (I don’t know which version it was)
  • Debian version. This file appeared in a Debian 10 backup files. Now, I’m in 11.

But the language is the same: spanish.

I believe it is the column names if you look at the user manual you will note that none of the default column names has spaces in between the words like for example Fecha de nacimiento does in English birthdate etc!!

It’s a long time since I imported CSV files myself, but I believe that Gramps understands English and local column names, and there is a chance that some translations have changed over the years, so that some column names are different too, and Gramps doesn’t understand its own Spanish from 4 years ago, or at least not all of it.

You can test this, by doing a CSV export from your current Gramps, and check the column names. And if some of these are different from the old file, patch the column names in a copy of the old file, so that they match again.

Another way is to start Gramps in English, by typing this command in terminal:

LANG=en_GB.UTF-8 gramps

If you do this, Gramps will run in English, so that you can again try a CSV export to see the English column names, and put those in a copy of your old file.

The LANG variable shown here has no permanent effect on Gramps. It only makes Gramps speak English during that specific run.

I think that it is a bug due to how the headings have been translated into Spanish. Both “Given name” and “Name” (as in a place name) have been translated as “Nombre”. This could be causing the given name to be interpreted as a place name.

Try replacing the column heading “Nombre” with “firstname” in the person section and try again.

When I do a CSV export in English, I see a column name ‘Given’. There is no ‘firstname’ column here.

Not changing software language, I exported again the same data. Both headers are equal:

Lugar,Título,Nombre,Tipo,Latitud,Longitud,Code,Enclosed_by,Fecha
[P0000],,Italia,País,,,,,

Persona,Apellido,Nombre,Corto,Sufijo,Prefijo,Tratamiento,Sexo,Fecha de nacimiento,Lugar de nacimiento,Fuente para nacimiento,Fecha de bautismo,Lugar de bautismo,Fuente para el bautismo,Fecha de defunción,Lugar de defunción,Fuente para la defunción,Fecha de entierro,Lugar del entierro,Fuente para el entierro,Nota

And then,

Old file:

[I0000],Sottile,Mario,, Ezequiel,,,masculino,,,,,,,,,,,,,

New file:

[I0000],Sottile,,,Ezequiel,,,masculino,,,,,,,,,,,,,

The difference is the name “Mario” and a space before “Ezequiel”. Only those characters are different.

Also, I started GRAMPS in english (LANG=en_GB.UTF-8 gramps) but it couldn’t import anything. And, when exporting, as you imagine, where completely different: all in english. So, this didn’t fix the problem.

OK, what I meant is, that if you export in English, you use those column names as a replacement for the Spanish ones, thereby avoiding the phenomenon that Nick mentioned, where the place name and the person’s given name are both exported as Nombre, and the importer may not have a unique name to recognize the column by.

When run in English, Gramps doesn’t recognize Spanish column names, or Dutch ones, like I normally have, so you must patch (a copy of) the CSV before import, with the English column names.

In the Spanish translation the following column names are recognised for the given name: firstname, first_name, given_name, given, given name, nombre, Nombre and nombre de pila. The following are recognised for place name: Name, name, Nombre and nombre.

It is possible that a column with the heading nombre or Nombre could be misinterpreted.

At least one English heading will always be recognised for each column. This is why I suggested trying “firstname”. Using “nombre de pila” should also work.

1 Like

OK, good to know. I didn’t look at the code, but only used the export as an example.

Also, I think there’s a bug, a “SyntaxWarning” when trying to import the spanish file by running GRAMPS in english.

/usr/lib/python3/dist-packages/gramps/plugins/export/exportvcalendar.py:205: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if date_string is not "":
1 Like

Thanks for pointing this out. It looks like it should be changed to “!=” as suggested.

1 Like

Also-also… I change lines of the CSV from spanish to english, imported them by running GRAMPS in english and everything was imported correctly.

imagen

After doing this, I closed Gramps, run it again (in spanish) and everything is right now.
If you need me to do something else to debug this, tell me. (Maybe exporting now, compare with the old file and try to import it again?)

Yep. The bug is still there. As I said in last post, I exported to CSV, created a new Family Tree, imported the new file… and every Name dissappeared.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.