Can't run a GTK and python3 based application Cozy

Hi!
I would really love to use this application https://software.opensuse.org/package/cozy
I’ve installed it and tried to run it from a KDE start menu, but it won’t start. I tried to run it from command prompt. The command to start it is com.github.geigi.cozy which took me some time to find.


aleksandr@aleksandr-pc:~> com.github.geigi.cozy 

(com.github.geigi.cozy:26772): Gtk-WARNING **: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(com.github.geigi.cozy:26772): Gtk-WARNING **: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(com.github.geigi.cozy:26772): Gtk-WARNING **: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Traceback (most recent call last):
  File "/usr/bin/com.github.geigi.cozy", line 35, in <module>
    from cozy.ui import CozyUI
  File "/usr/lib/python3.6/site-packages/cozy/ui.py", line 6, in <module>
    from gi.repository import Gtk, Gio, Gdk, GLib, Gst
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/lib64/python3.6/site-packages/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/usr/lib64/python3.6/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib64/python3.6/site-packages/gi/overrides/Gst.py", line 582, in <module>
    real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1], type(Gst.init))]
  File "/usr/lib64/python3.6/inspect.py", line 342, in getmembers
    value = getattr(object, key)
  File "/usr/lib64/python3.6/site-packages/gi/module.py", line 143, in __getattr__
    assert g_type == TYPE_NONE
AssertionError

Does anyone know what it means and what is the solution to make the app run?

Hi
If you look at the right on the following link (Requires), did all those packages get installed?
https://build.opensuse.org/package/binary/X11:Pantheon:Apps/cozy/openSUSE_Leap_15.1/x86_64/cozy-0.6.15-lp151.33.1.noarch.rpm esp. the typelib ones?

I’ve found these missing:


python3-distro
python3-pytz
python3-requests
typelib-1_0-Gtk-2_0

I’d installed these, but it didn’t fix the problem, I get the same error when try to run the app.

Hi
Something still missing then…

For me on the GNOME DE…


From Leap 15.1 repos;

zypper in cozy

The following 6 NEW packages are going to be installed:
  cozy python3-gst python3-magic python3-mutagen python3-peewee python3-pytaglib

Upgrade to 0.6.15;

zypper in https://download.opensuse.org/repositories/X11:/Pantheon:/Apps/openSUSE_Leap_15.1/noarch/cozy-0.6.15-lp151.33.1.noarch.rpm

The following 2 NEW packages are going to be installed:
  python3-distro python3-pytz

The following package is going to be upgraded:
  cozy

The following package is going to change vendor:
  cozy  openSUSE -> obs://build.opensuse.org/X11

com.github.geigi.cozy 

'/usr/bin/com.github.geigi.cozy']
11:47:27 [MainThread  ] [main      ] [INFO ]  ('opensuse-leap', '15.1', 'n/a')
11:47:27 [MainThread  ] [main      ] [INFO ]  Starting up cozy 0.6.15
11:47:27 [MainThread  ] [ui        ] [INFO ]  Initialize main window
11:47:27 [MainThread  ] [ui        ] [INFO ]  Not connecting about close button.
11:47:27 [Thread-5    ] [offline_ca] [INFO ]  Startet processing queue

Where did you install your app from?
It can be found here, packaged for your version of openSUSE

https://software.opensuse.org/package/cozy

The reason why I ask is that the command you posted is not typical for launching an app, it’s more typical of how a library is referenced from within an application.

TSU

I installed it from there. I even used the 1-click install feature to be sure.

I agree, this is strange.

I also tried this version, doesn’t work either, same error.

Hi
There are a increasing number of applications using that naming convention, as well as desktop files… have a look in /usr/share/applications. Maybe more on the GNOME side… eg /usr/bin/com.github.johnfactotum.Foliate.

Hi
That could be an issue, can you post the output from;


zypper lr -d


#  | Alias                               | Name                                     | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                       | Service
---+-------------------------------------+------------------------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------------------+--------
 1 | dvd                                 | dvd                                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://opensuse-guide.org/repo/openSUSE_Leap_15.1/                                        |        
 2 | home_malcolmlewis_TESTING           | Testing packages... (openSUSE_Leap_15.1) | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_Leap_15.1/ |        
 3 | http-download.opensuse.org-0a345c19 | devel:languages:go                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_15.1/        |        
 4 | http-download.opensuse.org-0e505cdf | home:alois                               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/alois/openSUSE_Leap_15.1/                 |        
 5 | http-download.opensuse.org-4c6abb1f | multimedia:apps                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/multimedia:/apps/openSUSE_Leap_15.1/            |        
 6 | http-download.opensuse.org-53400afb | home:enzokiel                            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/enzokiel/openSUSE_15.1_Update/            |        
 7 | http-download.opensuse.org-5777b57d | home:fschuett                            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/fschuett/openSUSE_Leap_15.1/              |        
 8 | http-download.opensuse.org-69cf5234 | openSUSE:Leap:15.1:Update                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.1/oss/                                        |        
 9 | http-download.opensuse.org-724e7a07 | home:varkoly:OSS-4-1:leap15.1            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/varkoly:/OSS-4-1:/leap15.1/standard/      |        
10 | http-download.opensuse.org-7afd14b6 | devel:tools:building                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/tools:/building/openSUSE_Leap_15.1/      |        
11 | http-download.opensuse.org-914879c2 | home:sb56637:misc                        | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/sb56637:/misc/openSUSE_Leap_15.1/         |        
12 | http-download.opensuse.org-9b8d23d0 | devel:languages:haxe                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/haxe/openSUSE_Leap_15.1/      |        
13 | http-download.opensuse.org-a62d6b9d | home:regataos                            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/home:/regataos/openSUSE_Leap_15.1/              |        
14 | http-download.opensuse.org-f3d77090 | Education                                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/Education/openSUSE_Leap_15.1/                   |        
15 | http-download.opensuse.org-fca5f1da | multimedia:libs                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_Leap_15.1/            |        
16 | packman                             | packman                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://packman.inode.at/suse/openSUSE_Leap_15.1/                                          |        
17 | repo-debug                          | Debug Repository                         | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/debug/distribution/leap/15.1/repo/oss/                       |        
18 | repo-debug-non-oss                  | Debug Repository (Non-OSS)               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/debug/distribution/leap/15.1/repo/non-oss/                   |        
19 | repo-debug-update                   | Update Repository (Debug)                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/debug/update/leap/15.1/oss/                                  |        
20 | repo-debug-update-non-oss           | Update Repository (Debug, Non-OSS)       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/debug/update/leap/15.1/non-oss/                              |        
21 | repo-non-oss                        | Non-OSS Repository                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.1/repo/non-oss/                         |        
22 | repo-oss                            | Main Repository                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.1/repo/oss/                             |        
23 | repo-source                         | Source Repository                        | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.1/repo/oss/                      |        
24 | repo-source-non-oss                 | Source Repository (Non-OSS)              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.1/repo/non-oss/                  |        
25 | repo-update                         | Main Update Repository                   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.1/oss                                         |        
26 | repo-update-non-oss                 | Update Repository (Non-Oss)              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.1/non-oss/                                    |        
27 | skype-stable                        | skype (stable)                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://repo.skype.com/rpm/stable/                                                        |        
28 | spotify-easyrpm                     | spotify-easyrpm                          | Yes     | (  ) No   | Yes     |   99     | rpm-md | dir:/var/cache/spotify-easyrpm                                                            |        



Hi
That’s a lot of active repositories, there may be a non system (eg home) that has pulled in a package that’s not compatible. The only thing I can suggest is fire up YaST Software Management and select the repository view, select each on the non standard repositories and see what packages are installed and see if any of the python and gtk ones for cozy are installed from those home repos…

If you think a conflict is the problem,
You’ll probably find your problem faster if you install into a clean virtual machine and inspect the results.
You can then decide whether to continue to run the app in the virtual machine or use that info to troubleshoot your physical machine.

TSU

It looks like home:fschuett has these

What do I do next?

Hi
See the versions tab, you can select each python one and in the versions tab switch back to the openSUSE OSS version, impact, unknown as if another package is built from that version it may want to uninstall, one of the problems of home repositories and using ‘system packages and/or later versions’. It highlights one of the Tumbleweed features in version updates can be pushed to the development repository, then to factory so it appears in Tumbleweed :wink:

I switched the vendor to Main repository OSS, but the problem still remains.

Hi
OK, if you create a test user and login as the test user, does the application run?

I’ve tested on a fresh user, the same error message.

Hi again.
I set up a Virtualbox with the same OpenSUSE Leap 15.1 installation and was able to run the application. I only used the preinstalled repos + codecs from pacman.
What can I do next to fix the problem on my main system?

Hi
A hard task since you need to figure out what packages are from what repository and why they installed and did not use the system packages…

You can see this via for example packages installed from repository #1;


zypper se -ir 1

So the above is se to search, -i for installed and the -r for repository number from the output of zypper lr.

What packages should I search for and identify the repos they came from?
Should I then switch the vendor to the official repos?

Hi
It would be any python3, gtk and typelibs AFAIK, but could also be an underlying application that is still missing…

Yes, switch vendor and see how it goes, it should highlight if it is going to remove a package you need from one of the home repositories, then can investigate when/if that happens.