1

I get the following error message. It doesn't explain what I am importing so I don't know how to correct it. I didn't even know I was importing, I thought I was updating.

# update-manager -d
Checking for a new Ubuntu release
/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcher.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk
/usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewerWebkit.py:33: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import WebKit2 as WebKit
Gtk-Message: 05:19:30.703: GtkDialog mapped without a transient parent. This is discouraged.
Terrance
  • 41,612
  • 7
  • 124
  • 183
John
  • 167

1 Answers1

1

This error has recently been informed to Ubuntu. Here is the way to fix these couple of errors. In case you see this error carefully, it already gives you information about what is wrong and how it can be fixed.

Step 1 : Open your terminal and type

cd /usr/lib/python3/dist-packages/DistUpgrade

Here you would need to work on two python files DistUpgradeFetcher.py and ReleaseNotesViewerWebkit.py.

Okay let's fix DistUpgradeFetcher.py first :) Open this file with any text editor and fix the import lines to :

import gi
gi.require_version("Gtk","3.0")
from gi.repository import Gtk

Similarly open ReleaseNotesViewerWebkit.py and fix the import lines to :

import gi
gi.require_version('WebKit2', '4.0')
from .ReleaseNotesViewer import open_url
from gi.repository import Gtk

Doing this will fix the errors and when running sudo update-manager -d you won't get errors.