Fix Py3 exception in GTK plugin.