Closed Martinligabue closed 7 months ago
Thanks for reporting the issue.
That's quite strange, it seems to be the same issue as in https://github.com/DavidoTek/ProtonUp-Qt/issues/155.
Can you open a terminal and run following command to show the version of the Steam library:
python3 -c "import steam; print(steam.__version__)"
What is the output of the command?
1.4.3
ps. I found that he solved by updating to 1.4.4, https://github.com/DavidoTek/ProtonUp-Qt/issues/155#issuecomment-1345661908
how can I do that? should I subscribe to beta client?
1.4.3
Okay, that seems to be the issue then. I wonder why Nobara ships with this old version...
ps. I found that he solved by updating to 1.4.4, # 155 how can I do that?
Nobara is probably using the same version of the Steam library as Fedora, which is still v1.4.3: https://src.fedoraproject.org/rpms/python-steam I think the best solution (that can't break anything else on the system) would be to install ProtonUp-Qt via Flatpak or AppImage.
should I subscribe to beta client?
That isn't necessary as the version of the Steam library is independent of the Steam client.
Thanks, I'll use the appimage until next version.
Should this issue be closed now? I'm not really familiar with issues in github.
Should this issue be closed now?
I think it's completed from our side.
I'm not sure whether the issue should be reported on Nobara's side as it is installing ProtonUp-Qt directly even though the dependencies Fedora includes are too old (1.4.3 instead of 1.4.4). Maybe Nobara should preinstall the official Flatpak instead, that would prevent this kind of issues, but on the other hand increase the install size...
We already ship the latest version of protonup-qt (2.8.0):
https://copr.fedorainfracloud.org/coprs/gloriouseggroll/nobara/build/5774049/
which was provided over a month ago. also, the package in question is python-steam, which comes from fedora:
$ sudo dnf list installed | grep -i steam
[sudo] password for tcrider:
python3-steam.noarch 1.4.3-2.fc38 @fedora
steam.i686 1.0.0.76-1.fc38 @rpmfusion-nonfree
steam-devices.i686 1.0.0.76-1.fc38 @rpmfusion-nonfree
and is already at it's latest version, there IS NO 1.4.4, so I'm not sure where that user got 1.4.4 from:
https://github.com/ValvePython/steam/tags
By doing this:
https://github.com/DavidoTek/ProtonUp-Qt/pull/157
You've bumped it to a requirement for a version that has not been released yet to any distro, essentially -requiring- users to use the git-built version or backport the patch. I have no problem doing that for Nobara but it's going to be the same for any other distro that packages based on latest tagged release.
Update:
This is partially valve's fault, they bumped the version without tagging it:
https://github.com/ValvePython/steam/commit/dd147db07f6797b787633cb90a8e9222dcb8b2f2
Update 2:
Even after fully updating python-steam and protonup-qt i was getting this with the show games list button:
Traceback (most recent call last):
File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2.py", line 347, in btn_show_game_list_clicked
gl_dialog = PupguiGameListDialog(install_directory(), self.ui)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 40, in __init__
self.setup_ui()
File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 50, in setup_ui
self.setup_steam_list_ui()
File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 81, in setup_steam_list_ui
self.update_game_list_steam()
File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 154, in update_game_list_steam
p.loadFromData(pkgutil.get_data(__name__, file))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/pkgutil.py", line 640, in get_data
return loader.get_data(resource_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap_external>", line 1130, in get_data
IsADirectoryError: [Errno 21] Is a directory: '/usr/lib64/python3.11/site-packages/pupgui2/resources/img/'
I then looked up the docs on pkgutil.get_data:
https://docs.python.org/3/library/pkgutil.html
which notes the syntax is:
pkgutil.get_data(package, resource)
So I changed this line:
p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
to this:
p.loadFromData(pkgutil.get_data('resources/img', awacy_icon))
and now it shows the games list properly
This is partially valve's fault, they bumped the version without tagging it: ValvePython/steam@dd147db
I've noticed that too, I'm not sure why they didn't create the tag. It looks like they only changed the one issue and didn't bother to create a tag for that...
I have no problem doing that for Nobara but it's going to be the same for any other distro that packages based on latest tagged release.
That would be good. Ideally the upsteam Fedora repository should also update the dependency.
Even after fully updating python-steam and protonup-qt i was getting this with the show games list button which notes the syntax is:
pkgutil.get_data(package, resource)
I think the syntax should be correct like this. When __name__
(here pupgui2.gamelistdialog
) is supplied for the package
, it will get the containing directory of that file and join it with the path supplied in resource
, resulting in .../pupgui2/resources/img/...
The issue
IsADirectoryError: [Errno 21] Is a directory: '/usr/lib64/python3.11/site-packages/pupgui2/resources/img/'
It seems like it builds the path correctly, but in your case, for some reason the name of the image file is missing and instead tries to open the folder instead. When you supply "resources/img"
as the package, it would cause a KeyError, but it is internally handled and get_data
returns None
.
That will not prevent the game list dialog from opening, but instead the anti cheat image will not be loaded (can you confirm that? The column Anticheat
should show 0
instead of an image).
If that is the case, I wonder what is causing the image name to be empty.
yeah correct it does show a number instead of the image. weird.
AHA
It's thinking 0 values are null values. If I use:
if awacy_icon:
p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
It renders the icons (with 0 values replaced with ? marks ofc). Anything not a 0 shows an icon.
Ended up doing this:
awacy_tooltip, awacy_icon = self.get_steamapp_awacystatus(game)
if not awacy_icon:
awacy_icon = 'awacy_unknown.png'
if not awacy_tooltip:
awacy_tooltip = "Anti-Cheat status unknown"
p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
Okay, that is the problem then.
I'm just not sure yet how that could happen. The method get_steamapp_awacystatus
should not be able to return an empty string:
It first sets awacy_icon = ''
, but then checks the status using if..elif..else
. All cases are covered...
I wonder if setting awacy_icon = 'awacy_unknown.png'
in the first place would resolve the issue. Would be strange if it did...
If this is still an issue, maybe we can go with defaulting awacy_icon = 'awacy_unknown.png'
in get_steamapp_awacystatus
and resolve this issue? I believe the games list issue should now be resolved given the changes made to resolve #226.
The AWACY issue is definitely odd but if it is no longer occurring I think that's the last of this issue resolved, as the Steam dependency has been bumped and any parsing issues or Steam path detection issues should be resolved. If it is still occurring, the above fix may be enough to resolve the problem.
Last time I checked, more or less a month ago, the issue had been resolved, I didn't know it was still open, if someone can confirm it works now, this could be closed. I no longer am using Nobara so I can't confirm right now
fwiw in nobara we're still using my patch from https://github.com/DavidoTek/ProtonUp-Qt/issues/235#issuecomment-1550765229, I wanted it to be fixed regardless of steam version dependency:
From 26dfcbb8bb65e0b2ecf01659cc67ad114c3305cc Mon Sep 17 00:00:00 2001
From: GloriousEggroll <gloriouseggroll@gmail.com>
Date: Mon, 15 May 2023 20:53:08 -0600
Subject: [PATCH] really fix
https://github.com/DavidoTek/ProtonUp-Qt/issues/235
---
pupgui2/pupgui2gamelistdialog.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pupgui2/pupgui2gamelistdialog.py b/pupgui2/pupgui2gamelistdialog.py
index 12f5678..deb0da7 100644
--- a/pupgui2/pupgui2gamelistdialog.py
+++ b/pupgui2/pupgui2gamelistdialog.py
@@ -150,7 +150,7 @@ class PupguiGameListDialog(QObject):
lblicon = QLabel()
p = QPixmap()
awacy_tooltip, awacy_icon = self.get_steamapp_awacystatus(game)
- p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
+ p.loadFromData(pkgutil.get_data('resources/img', awacy_icon))
lblicon.setToolTip(awacy_tooltip)
lblicon.setPixmap(p)
lblicon.setAlignment(Qt.AlignCenter)
--
2.40.1
Didn't realise Nobara was using a patch, that's good to know.
Though it seems this patch cannot be applied generally, as this will break when running outside of Nobara from the looks of it. The behaviour this fixes on Nobara causes the behaviour at least on my machine (the icon displays as a number i.e. it can't be loaded because pkgutil.get_data('resources/img', awacy_icon)
is None
).
@DavidoTek any thoughts on the best approach going forward for this issue?
Didn't realise Nobara was using a patch, that's good to know.
Though it seems this patch cannot be applied generally, as this will break when running outside of Nobara from the looks of it. The behaviour this fixes on Nobara causes the behaviour at least on my machine (the icon displays as a number i.e. it can't be loaded because
pkgutil.get_data('resources/img', awacy_icon)
isNone
).@DavidoTek any thoughts on the best approach going forward for this issue?
ah it does the same here, i can remove the patch and double check
yeah works fine without the patch, this can be closed
DavidoTek any thoughts on the best approach going forward for this issue? yeah works fine without the patch, this can be closed
I'm still not sure what exactly was causing the problem. Maybe Nobara used a different way of storing the Python resources than the Flatpak version.
Good to know it's fixed now also on Nobara, I will close this issue then.
Please fill out following when reporting a new bug:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
you should see the list of games installed in steam
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Appimage works flawlessly
Terminal output
only last line appeared after clicking "show game list"