When imported .ged file I cannot figure out how to locate photos

I’m trying to run the portable applications version of Gramps on Windows 10. The version displayed in Help>About, right now, is AIO32-5.1.5-1. As it happens I have what Gramps would call a Family Tree running on Webtrees. I want to export that family tree to a .ged file for import on Gramps. That all seems to work fine but, I think, the .ged file does NOT include media (i.e., photos). However, I do have the photos in the same folder structure used by Webtrees. When I select a person in Gramps and try to view an associated photos it appears that Gramps knows the sub-directory names and structure but cannot find the photo. I would think that Gramps needs to know where the root of that sub-directory structure resides. I haven’t been able to figure out how that might be done which I suspecxt is what is causing the problem.

I’m thinking that media is a natural part of export and import which suggests this ought to be doable and maybe even easier to figure out. Would appreciate it if someone could explain what I’m failing to understand.

You can set the path to the media for each family tree by:

  1. Inside Gramps, select Edit from the menu
  2. Select Preferences in the menu
  3. Select the Family Tree tab
  4. Change the the “Family Tree’s Media Path” to point to the root of the media

If it isn’t correct, try opening a media file to see how it differs from what it should be.

When I open Preferences>Family Tree I get the following:

I’m NOT seeing anything that has to do with media path.

I do have a prior release of the Gramps Portable App running on another computer (actually another USB drive) which has a sub-directory named “.\data\settings\gramps\photos” which contains the image files. I have no recollection of how that came to be but I tried putting the photos in the same place on my new/upgraded version which I’m trying to get working but with no success.

You need the General tab:


Yes, I found an item called “Base path for relative media paths” which I set to “w:$appsport\portableapps\grampsportable\data” and I have the image files in sub-directories of “data” which match the media paths displayed (from the database I think) when you select the Media button in the frame on the left side of the screen. However, under the Gallery tab for an Individual it still displays a bunch of button with an “X” in them instead of the picture. I have tried stopping and restarting Gramps between changes.

I also went and looked at Gramps Legacy version that is working and found that the “Base path for relative media paths” was blank (i.e., nothing entered). On that system the image files were located in “\portableapps\grampsportable\data\settings\gramps”. Therefore, I tried moving them to the same sub-directory on this new version of Gramps and removed (blanked) the setting for “Base path for relative media paths” but with no change in results. In that image files are still NOT being found.

This is for 5.2. The Media path was moved to the Family Tree tab.

If you set the Media Path before importing, this path will be where Gramps creates the exported media folder.

1 Like

If you don’t set the media path, media locations are probably expected to be relative to what Gramps thinks is its home folder, whatever that is. And since I have never worked with media on Gramps portable, I don’t know what it is.

Anyway, if you set it to a full path using the standard folder selector, you will probably get a path without variables in its name, and if can see media lines in the media category, you should see miniatures in the galery tab when you select an item.

There is a chance that the miniatures that you see in the gallery tab for a person are thumbnails, which need to be generated sometimes. There is an entry for that in the tools menu, which also has two other entries for media checking and management.

Today I tried creating a new family tree and then setting the fields in Preferences, prior to performing the import of the .ged file, to specified locations as follows:

  1. General Tab > Base path for relative media paths
  2. Family Tree Tab > Family Tree Database Path
  3. Family Tree Tab > Backup Path
    Then when the import operation was performed the result was the screen the follows:
    The messages that start with “Line ignored …” are related to a user name that appears to be included in the exported file produced by Webtrees. I’m not aware of any such user name that pertains to Gramps. Therefore, these messages are NOT surprising. The rest say “Could not import” what I suspect amounts to all of the pictures.

I also went and looked in the sub-directories that I created, and specified in preferences as mentioned above, and found that there was nothing created there. This includes the database which appears to have been created in the normal sub-directory of settings even though I specified a unique location. This suggests that media paths are NOT the only thing NOT working with respect setting preferences.

I haven’t spent a lot of time checking the results just yet but it does appear as though all of the people and families are included in the new Family Tree.

The screenshot doesn’t tell that much, because the lines are all truncated by the view, but if you try again, in another tree, you can click inside the text block, and select all text (Ctrl-A) and then copy it (Crl-C), so that you can paste it into notepad or something.

I’m also quite curious about the context of those /Photos/Ancestors lines. Are they part of FILE lines in the GEDCOM file.

In Linux, all paths starting with /, like these ones, are read as absolute paths, but I don’t know how this works on Windows, where absolute paths start with something like D:. Gramps may understand that in paths, / and \ mean sort of the same, but it might also know, that in Linux, a backslash has a different meaning. “Could not import” may also mean that the text is not in a FILE line at all.

Most errors are also stored in GEDCOM import notes, so if you can find those, there is no need to repeat the import.

I bet that Webtrees assumes that it runs on a web server with Linux, where /Photos is a path that is relative to your home folder on that server.

I didn’t think it was necessary to include the complete file name and rather sought to limit the size of the screenshot. The missing part are just the rest of path name for the media files.

Your discussion causes me to ponder what could be a very simple explanation for this problem. The GEDCOM (.ged) file was exported from Webtrees which is software used to operate a web server which is running on a Linux system. As such, a forward slash (/) is used to separate the various directories in the path name. However, on Windows the back-slash (\) character is used for the same purpose. Therefore, the GEDCOM file being imported (on the Windows system) uses a forward slash. If Windows wants a back-slash could that be the problem?

Of course that does NOT explain why the location preference for the database does NOT work either.

It would seem to me that for GEDCOM to be a standard, how path names are formulated is a pretty basic consideration and it would be set by the standard such that all software implementing the standard would conform. I’d guess that forward slash would be chosen to be the standard which would mean that Windows software would have to deal with that. I can confirm that when media is displayed in Gramps on a properly functioning Windows version it is the back-slash (\) that is displayed.

I don’t use webtrees, but I can replicate the problem when I export a GEDCOM in Linux, and import that in Gramps AIO running in Windows. In that case, all exported media have a path starting with /home/enno, and Gramps AIO shows the same error as you got.

I had to try this, because I didn’t know what the errors actually meant, and now I know. It is obvious that the files weren’t there, but my Gramps AIO did import their paths, and converted those to Windows format, just like you noticed too. And that means, that you can use the media management tool to do a string replace on those paths to get them right.

I also attempted a few more trials.

First, Webtrees is software for running a web server. Previously I pointed out that I run it on Linux. This is the case for my hosted website. However, Webtrees is written in PHP and requires a MySQL style database. As it turns out I also I have a test system running on Windows under XAMPP. Therefore, I tried repeating the export operation from this Windows test system. The GEDCOM (.ged) file produced was in the same format as that produced previously from the website running on Linux. In that, forward slash (/) characters were used for file names.

Second, I decided to try exporting from Gramps. Rather than the PortableApps version I’ve been struggling with I needed one that had a properly functioning Family Tree. In this case it was setup with my own method for running programs in a portable mode. The GEDCOM (.ged) file produced was in a different (from Webtrees) format for file names. The back slash (\) character was instead used in path names. Furthermore, the path names were absolute rather than relative even though the Family Tree that I’m exporting uses relative paths. In that, Preferences have the environment variable {GRAMPSHOME} specified for “Base path for relative media paths”.

I’m afraid this problem remains bewildering.

Finally, another trial produces some progress. Thanks to prior post calling attention to the tool that can be used to Manage Media I decided to try something else that was really pretty simple. As shown in the prior screenshot I posted, the import from the GEDCOM (.ged) file showed relative file names beginning with a slash (/). It occurred to me that maybe those were NOT needed and the Manage Media Tool made it easy to remove them. WaLa that seems to have fixed the problem.

Many thanks Ennoborg for willingness to participate in this discussion. It’s hard to say if and when (if ever) I’d have learned about the Manage Media Tool.

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