Guake / Guake/guake

Guake won't start due to incorrect SCHEMA_DIR

Open
#1,436 13 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
604
PR merge metrics
No merged PRs in 30d

Description

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
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 ab7b44ab346803f5846eb2959011ffe2270b8153. If I undo this change, guake will start.

Broken:
```python
>>> 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:
``` python
>>> 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)`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.