How can I fix this error? Gtk-WARNING **: GModule ... initialization check failed: GLib version too old (micro mismatch)
Asked Answered
F

2

8

I'm writing a python program with matplotlib, and I'm getting this error:

GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib >version too old (micro mismatch)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

(python:6304): Gtk-WARNING **: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)

(python:6304): Gtk-WARNING **: Loading IM context type 'ibus' failed

The program finishes executing, but the error won't go away. I'm running Ubuntu 16.

I tried reinstalling Glib, but nothing changed. I searched for help online, but couldn't find a solution. I'm a noob and I have no clue how to resolve this.

Can anyone help me out? I really appreciate your time!

Fugazy answered 15/8, 2016 at 21:30 Comment(14)
Seems it has been answered here : askubuntu.com/questions/806064/…Misrule
16.04 or 16.10 beta?Prairie
@Misrule there is no answer there, just some misguided "advice"Prairie
It's not error, it is warning. If you don't have any problems then simply ignore it.Tsang
What I'm thinking is if it happens with all GTK based programs, the issue (if any, seems it works) must be in the package. So may be more related to the distribution.Misrule
@IporSircer that's a very bad way of thinking. You should worry about warnings just as much as errors; warnings are trying to tell you there's a bug that could become a problem. In this case the bug is likely in the distribution and should be investigated.Prairie
@Prairie then fill a bugreport, it's not your problem until it works.Tsang
It could be your problem; it depends on what the warning says. Assertion 'GTK_SOMETHING (widget) != NULL' failed is a pretty good indicator you screwed up something with your code, but it doesn't crash the program either.Prairie
What happens if you run pastie.org/10937021? Are you using ibus for alternate input methods? (Open question.)Prairie
@Prairie Thank you for your help!! I'm on 16.04. Apparently, I don't even have GTK installed. Now I'm trying to install PyGTK and PyGObject with anaconda, but I'm getting errors. PyGTK gives me Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8wwtm3vb/PyGTK/, and anaconda says pygobject3 3.18.2* is in conflict with python 3.5. Any suggestions? I have no idea what I'm doing.Fugazy
Don't bother with anaconda; install the packages directly from the Ubuntu package repositories (sudo apt-get install python-gtk python-gobject python3-gobject gir1.2-gtk-2.0, though some of those package names may be wrong). For python-gobject, you'll need to change the import lines.Prairie
apt-get was unable to locate python-gtk. Python-gtk2 was already installed. I looked for anything else related to gtk but found nothing. Any ideas?Fugazy
I wouldn't know, sorry. At this point, I can only suggest filing a bug report on Launchpad. Good luck.Prairie
maybe late and not sure, but when I use screenftech I got the first GLib-GIO-Message: blabla... the reason is anaconda hijacked gsetting. solution is rename anaconda gsetting like this man does. Gsettings not working (to change wallpaper) I like it.Shelia
U
0

For others (like me) using the Anaconda Python distribution:

I had the same exact same GTK error messages, despite not having PyGTK installed or in use, in the qt console of Spyder. This began right after I installed a non-default package that automatically downgraded my PyQt version from 5 to 4. I removed it and upgraded the pyqt package, which returned spyder to its normal behavior. I do not know why modifying the pyqt version leads to GTK errors.

Note I used anaconda-navigator for the install / uninstall / ugrade steps, but all of this can be achieved through the usual conda command interface. Also, pyqtgraph was the offending library, but the latest version (0.10) installed via pip install pyqtgraph doesn't lead to this issue.

Untrue answered 2/12, 2016 at 2:18 Comment(3)
The question is dealing with GTK warning not with Qt. Please try to answer to the question correctly.Ornate
I agree it seems they should be unrelated, since they are separate GUI libraries. Nonetheless, I got the same GTK errors listed above for some reason, despite the fact that my environment (Spyder) is qt-based, as are the scripts I was running. I actually don't even have PyGTK installed. I am happy to take this answer down, but it may help others in my situation.Untrue
Agree, this answer might be value to some, so would leave it. On the other hand it does not answer the question, so it is definatly not "THE" answer. I suspect the two issues are related and what you endup doing is installing an older pyqtgraph (so instead of updating the lib in the system, you downgraded your python...)Selfstarter
S
0

I found my answer based on this link. In brief I had to manually replace a library with a newer version. In my case, I had to do this for my anaconda environment libraries. Note that searching for the library will replace multiple hits, so you have to find the correct one for your problem...

Here is what i did: enter image description here

Selfstarter answered 26/1, 2019 at 6:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.