After Fedora 39 upgrade - Missing Geocode.Glib

GRAMPS: 5.1.6
Python: 3.12.0 (main, Oct 2 2023, 00:00:00) [GC…
BSDDB: 6.2.9 (5, 3, 28)
sqlite: 3.42.0 (2.6.0)
LANG: en_US.UTF-8
OS: Linux (Fedora 39)
Distribution: 6.5.11-300.fc39.x86_64

I just finished upgrading to Fedora 39. When Gramps starts, it give a message “Failed to load the required module gi.repository.GeocodeGlib”.

I have a package already installed called geocode-glib-3.26.4-8.fc39.x86_6. Searching for geocode across all packages comes up with only this and its 32-bit sibling. “pip3 list” shows nothing installed for either geocode or glib. Searching PyPi with Poetry brings up a bunch of hits for “geocode”, but nothing that looks obvious.

There is probably some Python module I need to install. Does anyone have a hint as to what it might be?

Thanks - Bill Gee

1 Like

Hello Bill,

Some newer Linux release have a newer version of this library than what Gramps asks for. Can you check whether you may have such a version on your Fedora 39.

I ran into this issue on LMDE 6, which is based on Debian 12, and have very little experience with recent versions of Fedora, so this is a wild guess.

You may find more information when you install the prerequisites Gramplet, which works best on Gramps’ Dashboard page.

I’m on Mint myself, so I can’t give you direct info, but your package manager might give you more information about the version that you have now. And in many cases you also need an extra wrapper so that Python can find this library. You may need to look for a something with introspection in the description.

Hope this helps a bit.

Regards,

Enno

I had forgotten about the prerequisites checker. Thanks for the
reminder! It was already installed, so I just had to run it. It says
that geocodeglib version 1.0 or higher is needed and is not found.

========= From prerequisites Checker ===========
STRONGLY RECOMMENDED
The following packages are STRONGLY RECOMMENDED to be installed (needed
for geography and charts):

  • osmgpsmap 1.0 (Passed: version 1.0 or greater installed.)
  • Graphviz 8.1.
  • PyICU not found(ICU not found)
  • Ghostscript 10.01.2
  • python-fontconfig not found, (Requires version 0.5.x)

Optional
The following packages are optional:
Gtkspell enables spell checking in the notes.

  • GtkSpell 3.0 (Passed: version 3.0 or greater installed.) (enchant
    module: not found)
  • rcs installed TBD (Passed: version 5.9.4 or greater installed. If not
    on Microsoft Windows)
    Python Image Library (PIL) is needed for cropping images and LaTeX output.
  • (PILLOW 10.1.0)
  • GExiv2 : 0.10 (Exiv2 library : 0.27)
  • geocodeglib not found (Requires version 1.0 or greater installed.)
    For addon Networkchart, font White Rabbit provides an extremely readable
    result.
  • Installed font: found another font

In this screenshot, taken from Synaptic in Mint 21, you can see that I have two components installed:

The one shown at the top, which starts with gir, is a wrapper for the other one, where wrapper means that it wraps the code in the other one, so that it can be called from Gramps. And normally, when you install that wrapper, which you can recognize by the word introspection, the package manager knows that it depends on the library itself, so it will install both.

Package names can be quite different in Fedora, and if you don’t see the word introspection there, or the gir prefix, you may look for libraries marked as developer libraries instead.

This subject may already have been discussed in another thread, where I have the name for a Fedora lib that I found for this dependency, or another.

And here’s that other thread:

Hmmm … I find myself getting deeper and deeper!

Fedora 39 has a package called “python3-gobject-devel” Supposedly it
supplies files required to embed PyGObject. I installed the package but
Gramps still throws an error. There are packages that mention
“introspection” but none that looke like geocode-glib.

Looking at the source code for PlaceCoordinateGramplet.py - I see this:

     import gi
     gi.require_version('GeocodeGlib', '1.0')
     from gi.repository import GeocodeGlib

Searching on gi.repository led me to PyGObject. I cannot tell if I have
a python module called gi. It does not show up in “pip3 list”.

I found something else, though, that is puzzling. What is the name of
this Gramplet in the Plugin Manager? Looking in my gramps51/plugins
directory, I see a directory called PlaceCoordinateGramplet. However,
the Plugin Manager does not show anything by that name. Plugin Manager
has PlaceCleanup which is installed (and has a matching directory), and
Place And Coordinates which is NOT installed. Also PlaceUpdate which is
NOT installed.

There is nothing in the Plugin Manager that says Place Coordinate
Gramplet. I wonder if this is a left-over from some previous
experimenting? Would Place And Coordinates be the same functionality?

Fedora 39 might have a newer version, like Debian 12 has, and in that case, the require fails, because it’s looking for a version 1.0.

Your package manager might give you more information about that version. It’s not the 3.something of the underlying library, and it may be visible in the name of rhe developer package itself.

You can also try what happens when you execute the import in an interactive Python session.

Package names are not standardized, so you’re sort of on your own.

From an interactive Python session, I ran this:

================ Python session ===========
bgee@main2:~$ python
Python 3.12.0 (main, Oct 2 2023, 00:00:00) [GCC 13.2.1 20230918 (Red
Hat 13.2.1-3)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import gi
gi.require_version(‘GeocodeGlib’, ‘1.0’)
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python3.12/site-packages/gi/init.py”, line 129,
in require_version
raise ValueError(‘Namespace %s not available for version %s’ %
ValueError: Namespace GeocodeGlib not available for version 1.0
gi.require_version(‘GeocodeGlib’, ‘2.0’)
from gi.repository import GeocodeGlib

=================== end session ==============

I tried changing the gi.require_version line in
PlaceCoordinateGramplet.py to use 2.0 instead of 1.0. No luck, it still
complains when Gramps starts.

After some thinking, I realized that I do not remember when I last used
the Place Coordinate Gramplet. Indeed, I may have NEVER used it! When
I need GPS coordinates for a place, I almost always get them from either
Wikipedia or Find A Grave. Maybe the thing for me to do is just delete
the Gramplet.

If you want, you can skip the whole require version line, so that you just import gi, and then GeocodeGlib from gi. repository. Python will then import whatever version you have.

In general, it helps to be a bit creative with the Fedora package manager, assuming that there is one that can do the same thing as the software that I use for that in Mint: Synaptic.

In my Linux (Mint 21.2 Cinnamon), the package manager can also install packages that you might install with pip or pip3. And in the package repository that Mint uses, those are all packages with a python3-prefix.

From here, my advice would be that, unless you really like to experiment, you stick with the mainstream, i.e. Linuxes based on debian or ubuntu, because we know most of the packages that are required for those.

But OTOH, if you really like Fedora, you can give a lot back to our community when you can figure out what Gramps needs, and document that, in another thread here, or on the wiki.

I finally figured out how to get past the warning message. There are
TWO .py files that have to be modified. I had been modifying only one
of them. The change is to set gi.require_version() to 2.0 instead of
1.0. The two files are

PlaceCoordinateGramplet.py Line 40

PlaceCoordinateGramplet.gpr.py Line 65

Plugin Manager will give a warning during installation, but the files
get put in place anyway.

Fedora’s repositories have over 4000 packages whose names contain
“python3-”.

OK, good to know. And now that you mention it, I remember a similar comment from a fellow developer, after I ran into the same problem with LMDE 6, which is based on Debian 12.

Since there were problems with that, I returned to ubuntu based Mint 21.2, and never made those corrections.

Is your question related to some add-on?

I am under Fedora 39 too and Gramps 5.1.6 works absolutely fine. But I have practically no add-on installed. The difference between your configuration and mine is probably I prefer KDE Plasma to Gnome (though all GTK+ libraries are automatically installed by dnf through the dependency function).

It is about an add-on indeed, Place Coordinates in this case, but there are more that trigger problems in Debian 12, Fedora 39, and LMDE 6, and maybe the newest ubuntu too, i.e. not the 22.04 LTS that Linux Mint is based on.

And that problem lies in the fact that the Place Coordinates Gramplet tries to import version 1.0 of the Geocode.Glib, and these OS’s all come with version 2.0 of that.

We have that problem with Goocanvas too, as you can read in this thread:

And for most add-ons, there is a solution in the 5.2 beta, but others may depend on libraries that are not maintained anymore.

Hi Patrick -

Yes, this is about an addon - specifically Places and Coordinates. I
figured out a work-around. I have a dozen or so addons installed in
Gramps. This is the only one that complained.

I also am a KDE user. With this upgrade to Fedora 39 I am also going to
try and make Wayland work. I use nVidia display adapters, so that will
be a challenge. I also use Anydesk which currently requires X. So far

  • aside from the one addon - Gramps works great in Fedora/Wayland/nouveau.

The switch to Fedora 39 made at least one change that solves an
annoyance. If I drag/drop more than one item from the Gramps clipboard
to a window, it would be really nice to be able to ALT-O on each
confirmation dialog. On Fedora 38 I could do that to the first
confirmation dialog, but then the underlying window received focus. A
second ALT-O would OK the underlying window instead of the confirmation
dialog. In Fedora 39 that is fixed. It makes the workflow faster
because I have to move less between keyboard and mouse.

Under F38, I gave up trying this and I don’t think I’ll take a chance. My nVidia GPU seems to be considered obsolete. Wayland freezes with nouveau literally on boot. The proprietary driver compatible with my graphics card is below the minimal version. I tried it though. It is better than with nouveau but it ends up in screen tearing and weird blinking. So, I backed up to X.

I had also to be very cautious on sddm, taking care to install sddm-x11 AND remove sddm-wayland-plasma (if both were installed, it looks like sddm-wayland takes precedence and hell’s poppin’).

But checking the configuration to answer here, I’m surprised to discover that the upgrade process has installed sddm-wayland-plasma and removed sddm-x11 and all works fine. Except I still must start in multi-user mode (instead of graphical mode) and launch GUI manually with startx because I routinely open several sessions simultaneously and switch between them with Ctrl+Shift+Fn. This is no longer possible from the Fedora menu since several releases.

I would be glad to continue this conversation elsewhere. We are
wandering far from Gramps. I share your trepidations about Wayland but
fear it is coming to a difficult choice.

bgee (at) campercaver (dot) net

Rather than share eMail addresses in the forum, you can Private Message any forum user.

I have at least one addon that requires goocanvas. At startup the only
addin that complains is Place Coordinates. I do have Graph View
installed, and it works.

I have two versions of goocanvas installed:

Hi,

I’m running on LMDE6 (Linux Mint Debian12). I installed Gramps 5.1.6 from the backports (I was previously running 5.1.5).

I get the message when starting:

Location coordinates Gramplet: The required module gi.repository.GeocodeGlib could not be loaded.

What am I missing? What do I have to reinstall?

Thank you for your attention

There’s a rather extensive thread about the this optional module that is a prerequisite for the that Gramplet.

moving this posting there…