Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704130 - games-util/lutris-0.5.4 - lutris: AttributeError: type object 'TreeModelSort' has no attribute 'sort_new_with_model'
Summary: games-util/lutris-0.5.4 - lutris: AttributeError: type object 'TreeModelSort'...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-28 23:52 UTC by Marcin Woźniak
Modified: 2020-01-25 15:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix issue with all versions of gtk+ (lutris.patch,912 bytes, patch)
2020-01-25 15:19 UTC, Lineu Martins
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Woźniak 2019-12-28 23:52:09 UTC
When I started the GUI I see in the terminal:
$ lutris
2019-12-29 00:51:53,034: Running Lutris 0.5.4
2019-12-29 00:51:53,037: Using NVIDIA drivers 440.44 for x86_64
2019-12-29 00:51:53,038: GPU: GeForce MX150
2019-12-29 00:51:53,038: GPU: 10DE:1D10 17AA:39B0 using nvidia drivers
2019-12-29 00:51:53,038: GPU: 8086:5917 17AA:39B0 using i915 drivers
2019-12-29 00:51:53,078: Vulkan is supported
2019-12-29 00:51:53,079: Updating DXVK versions
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/lutris/gui/application.py", line 173, in do_activate
    self.window = LutrisWindow(application=self)
  File "/usr/lib64/python3.6/site-packages/lutris/gui/lutriswindow.py", line 102, in __init__
    self.game_store = self.get_store()
  File "/usr/lib64/python3.6/site-packages/lutris/gui/lutriswindow.py", line 321, in get_store
    self.show_installed_first,
  File "/usr/lib64/python3.6/site-packages/lutris/gui/views/store.py", line 133, in __init__
    self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter)
AttributeError: type object 'TreeModelSort' has no attribute 'sort_new_with_model'
2019-12-29 00:51:53,987: Updating D9VK versions
Comment 1 Michael Mair-Keimberger (iamnr3) 2019-12-29 09:15:13 UTC
This is because of x11-libs/gtk+-3.24.13. If you downgrade to x11-libs/gtk+-3.24.11  lutris will work again.
For some reason lutris doesn't work with x11-libs/gtk+-3.24.13.
Comment 2 Marcin Woźniak 2019-12-29 12:02:47 UTC
Sorry, for did not choose right component. I will downgrade gtk+ and I will write ;) 
Thank You for help ;)
Comment 3 Marcin Woźniak 2019-12-29 12:50:14 UTC
Yeah, I confirm after downgraded x11-libs/gtk+ . Lutris is working again... But why after upgrade the Lutris is not working... This is problem with Lutris or gtk+ ?
Comment 4 James Le Cuirot gentoo-dev 2019-12-29 13:09:54 UTC
Just a guess but check that dev-python/pygobject is up to date.
Comment 5 Marcin Woźniak 2019-12-29 16:44:02 UTC
Bumped version of dev-python/pygobject
https://github.com/gentoo/gentoo/pull/14169
Comment 6 James Le Cuirot gentoo-dev 2019-12-29 17:02:42 UTC
(In reply to Marcin Woźniak from comment #5)
> Bumped version of dev-python/pygobject
> https://github.com/gentoo/gentoo/pull/14169

I wasn't aware our package was outdated, I just meant that you should update your system. I take it 3.34.0 fixes the issue then?
Comment 7 Marcin Woźniak 2019-12-29 17:12:55 UTC
Sorry I did not do github well. I was do it again this is a new link 
https://github.com/gentoo/gentoo/pull/14171
Comment 8 Marcin Woźniak 2019-12-29 17:13:35 UTC
(In reply to James Le Cuirot from comment #6)
> (In reply to Marcin Woźniak from comment #5)
> > Bumped version of dev-python/pygobject
> > https://github.com/gentoo/gentoo/pull/14169
> 
> I wasn't aware our package was outdated, I just meant that you should update
> your system. I take it 3.34.0 fixes the issue then?

Nope :/ But I will update the ebuild ( I want to learn more about it)
Comment 9 Marcin Woźniak 2020-01-01 21:00:41 UTC
After the upgrade lutris (at the moment only in the master in GitGub https://github.com/lutris/lutris/issues/2554 ) The issue has been resolved. I asked at github if they realease new version of lutris and after that I can do pull request about that change ;)
Comment 10 Larry the Git Cow gentoo-dev 2020-01-02 02:27:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e758a76a1ecef8d224e11a208db33f6f69b9451

commit 3e758a76a1ecef8d224e11a208db33f6f69b9451
Author:     Stefan Strogin <steils@gentoo.org>
AuthorDate: 2020-01-02 02:21:39 +0000
Commit:     Stefan Strogin <steils@gentoo.org>
CommitDate: 2020-01-02 02:25:32 +0000

    games-util/lutris: add patch to fix issue with x11-libs/gtk+-3.24.13
    
    Reported-by: Marcin Woźniak <y0rune@aol.com>
    Closes: https://bugs.gentoo.org/704130
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Stefan Strogin <steils@gentoo.org>

 games-util/lutris/files/lutris-0.5.4-gtk.patch     | 29 ++++++++++++++++++++++
 ...{lutris-0.5.4.ebuild => lutris-0.5.4-r1.ebuild} |  4 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)
Comment 11 Lineu Martins 2020-01-25 15:19:07 UTC
Created attachment 604254 [details, diff]
patch to fix issue with all versions of gtk+

this patch is created over current one so if that one is remove it should be 

--- a/lutris/gui/views/store.py         2020-01-25 14:28:16.196635354 -0000
+++ b/lutris/gui/views/store.py         2020-01-25 14:48:37.633294234 -0000
@@ -130,7 +130,11 @@
         self.prevent_sort_update = False  # prevent recursion with signals
         self.modelfilter = self.store.filter_new()
         self.modelfilter.set_visible_func(self.filter_view)
-        self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter)
+        try:
+               self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter)
+        except AttributeError as e:
+               # Apparently some API breaking changes on GTK minor versions.
+               self.modelsort = Gtk.TreeModelSort.new_with_model(self.modelfilter)
         self.modelsort.connect("sort-column-changed", self.on_sort_column_changed)
         self.modelsort.set_sort_func(sort_col, sort_func, sort_col)
         self.sort_view(sort_key, sort_ascending)
Comment 12 Lineu Martins 2020-01-25 15:21:42 UTC
current patch only fix the issue with x11-libs/gtk+-3.24.13 but it break x11-libs/gtk+-3.24.11

https://github.com/lutris/lutris/commit/12a458db3c590c3f1972594e091a24cb4d65b610#diff-39d260af21504e74ec2c1d23e98f1808