Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guake won't start due to incorrect SCHEMA_DIR #1436

Open
SparkyBluefang opened this issue Oct 6, 2018 · 13 comments
Open

Guake won't start due to incorrect SCHEMA_DIR #1436

SparkyBluefang opened this issue Oct 6, 2018 · 13 comments

Comments

@SparkyBluefang
Copy link

Guake Terminal 3.4.0
Python 3.6.5
Gentoo Linux

I just upgraded Guake from 3.3.2 to 3.4.0 and it is now failing to start because it can't load the GLib schema.

Guake not running, starting it
[WARN] ===================================================================
[WARN] Unable to load the library libutempter !
[WARN] Some feature might not work:
[WARN]  - 'exit' command might freeze the terminal instead of closing the tab
[WARN]  - the 'wall' command is know to work badly
[WARN] Error: libutempter.so.0: cannot open shared object file: No such file or directory
[WARN] ===================================================================²
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/guake/main.py", line 295, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/guake/guake_app.py", line 123, in __init__
    schema_source = load_schema()
  File "/usr/lib64/python3.6/site-packages/guake/guake_app.py", line 119, in load_schema
    SCHEMA_DIR, Gio.SettingsSchemaSource.get_default(), False
GLib.GError: g-file-error-quark: Failed to open file “/usr/lib64/python3.6/site-packages/data/gschemas.compiled”: open() failed: No such file or directory (4)
Error opening directory “/usr/lib64/python3.6/site-packages/data”: No such file or directory
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/guake/main.py", line 295, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/guake/guake_app.py", line 123, in __init__
    schema_source = load_schema()
  File "/usr/lib64/python3.6/site-packages/guake/guake_app.py", line 119, in load_schema
    SCHEMA_DIR, Gio.SettingsSchemaSource.get_default(), False
GLib.Error: g-file-error-quark: Failed to open file “/usr/lib64/python3.6/site-packages/data/gschemas.compiled”: open() failed: No such file or directory (4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/guake", line 10, in <module>
    sys.exit(exec_main())
  File "/usr/lib64/python3.6/site-packages/guake/main.py", line 410, in exec_main
    if not main():
  File "/usr/lib64/python3.6/site-packages/guake/main.py", line 310, in main
    instance = Guake()
  File "/usr/lib64/python3.6/site-packages/guake/guake_app.py", line 126, in __init__
    try_to_compile_glib_schemas()
  File "/usr/lib64/python3.6/site-packages/guake/paths.py", line 97, in try_to_compile_glib_schemas
    subprocess.check_call(["glib-compile-schemas", "--strict", SCHEMA_DIR])
  File "/usr/lib64/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['glib-compile-schemas', '--strict', '/usr/lib64/python3.6/site-packages/data']' returned non-zero exit status 1.

I tracked it down to ab7b44a. If I undo this change, guake will start.

Broken:

>>> d = os.path.dirname(os.path.dirname(sys.modules["guake"].__file__))
>>> p = os.path.basename(os.path.abspath(os.path.join(d, "..")))
>>> print('%s\n%s' % (d, p))
/usr/lib64/python3.6/site-packages
python3.6

Works:

>>> d = os.path.dirname(sys.modules["guake"].__file__)
>>> p = os.path.basename(os.path.abspath(os.path.join(d, "..")))
>>> print('%s\n%s' % (d, p))
/usr/lib64/python3.6/site-packages/guake
site-packages

Was the intended change perhaps to change the next line from os.path.abspath(os.path.join(d, "..")) to os.path.dirname(d)?

@jer-gentoo
Copy link

@zqb-all
Copy link
Contributor

zqb-all commented Oct 7, 2018

The same problem in my ubuntu18.04. And tracked it down to ab7b44a can't help.

@zqb-all
Copy link
Contributor

zqb-all commented Oct 7, 2018

The same problem in my ubuntu18.04. And tracked it down to ab7b44a can't help.

sudo make reinstall have this problem.
sudo -H make reinstall work for me.

@y2kbadbug
Copy link

This problem also exists in FreeBSD. I have been working on updating the port, got it to compile, but it's complaining about the gschemas missing. It's looking in /usr/local/lib/python-3.6/site-packages/data (Why is it even looking there?)

@gsemet
Copy link
Member

gsemet commented Oct 9, 2018

hi. how is package install on freebsd? make install is obviously debian oriented, so if you have more information on how python works on other systems I can rework it :)

@SparkyBluefang
Copy link
Author

@y2kbadbug I'm assuming the FreeBSD problem is the exact same one I'm seeing on Linux, due to the change in ab7b44a. If you manually undo these changes on the installed paths.py I'm willing to be it will start working.

@gsemet Might I suggest moving the data, and po directories into the python module? That would simplify the path resolution and avoid needing to walk up and down the directory tree and hope you end up in the correct location.

def get_data_files_dir():
    return os.path.dirname(sys.modules["guake"].__file__)

As far as I can tell, the files in /usr/share/guake/ (or equivalent) are only referenced by guake at run time, so there dosn't appear to be a reason to install them outside of the python module.

@gsemet
Copy link
Member

gsemet commented Oct 10, 2018

this is quite difficult to follow. pypi wheels "data" section is not well documented, so there is lot of latitude here. I think pypi install it into /usr/local/share/guake (to be cofnirmed).
debian started packaging it into /usr/share/guake. I mimicked it to put it into /usr/local/share/guake in my make install. In my custom rebuild of pip install I kept this file, but it makes it very difficult to access to it using pkg_resource, which is being replaced.

So yet, maybe I'll rework it again to place it into the python module, at least this would simplify this mess. But having the resource in /usr/share/guake looked cool at the time :)

@y2kbadbug
Copy link

I created a separate ticket for FreeBSD support #1444

@eblis
Copy link

eblis commented Oct 24, 2018

I have the same issue on Linux Mint 19.

@lucasbru
Copy link

lucasbru commented Nov 2, 2018

Same issue on fedora 29

@mskrip
Copy link

mskrip commented Nov 9, 2018

Had the same issue on Arch. Realized I had both guake from Arch repos and from pip. Solved by uninstalling the pip version.

@drNoob13
Copy link

Your Guake installing from source was in conflict with your guake installed from pip. Uninstall the pip version would solve that for you.

Guake error throw upon starting:

$ guake
Guake not running, starting it
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
.
.
subprocess.CalledProcessError: Command '['glib-compile-schemas', '--strict', '/home/tuan/.local/lib/python3.5/site-packages/data']' returned non-zero exit status 1

Uninstall conflicting pip-built guake

$ pip3 uninstall guake

Uninstalling Guake-3.4.0:
  /home/tuan/.local/bin/guake
  /home/tuan/.local/bin/guake-toggle
  /home/tuan/.local/lib/python3.5/site-packages/Guake-3.4.0.dist-info/COPYING
.
.
  /home/tuan/.local/share/guake/po/zh_CN.po
Proceed (y/n)? y
  Successfully uninstalled Guake-3.4.0

Start Guake again (no error)

$ guake
Guake not running, starting it
Guake Terminal 3.5.0
VTE 0.42.5
Gtk 3.18.9
created fresh notebook for workspace 0
Spawning new terminal at /home/tuan

(guake:22612): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
current workspace is 0
can't bind show-focus key
Guake initialized
Showing the terminal
Hiding the terminal

Press F12 to use it.

@Davidy22
Copy link
Collaborator

Merged #1893 that may fix this, new version of guake coming soon so that the affected can confirm whether or not this is fixed. This will also be in latest git master, but compiling from source sends files to a different place which will make this work, but doesn't quite confirm that the issue is dealt with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants