-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
ProtonUp-Qt Flatpak ver. 2.9.2 - UnicodeDecodeError #424
Comments
(Note: I believe this is distinct from #415) Can't reproduce on Arch Linux with Flatpak (v2.9.2) or 887702a. I wonder if this is locale-related? It seems like this could be a bug in the upstream VDF library with handling unicode characters, which may come about from parsing a I'll try inserting some unicode characters into a VDF file and see if ProtonUp-Qt (or more specifically, the upstream VDF library) can parse it. |
From doing some research it appears that the error may actually be pretty much as stated; the format of the file may not be UTF-8. Can you check the format of your
I couldn't convert to a new charset to test but it might be a good idea to check what the encoding of the file is. Any text editor should tell you, similarly But I suspect this issue comes from the file simply not being UTF-8. This is odd because Python's As per the Python
We would be using text mode as this is the default (I believe you have to specify something like |
Thank you for your response. |
Hmm, it sounds like something is wrong with your The text
If your file size is more than a few bytes (the text For what it's worth, ProtonUp-Qt might've crashed if it tried to read this file anyway. I can't remember how strict we are about the contents of Some other things that might noteworthy are:
|
The file size is 34,1 kb.
The file does get modified when I open and close Steam. The file size changes to 34,0 kb. |
The file size is probably fine, maybe the average size is smaller than I anticipated 😅 But approx 34kb surely suggests the file stores more than just I did a bit of digging and it seems that, particularly on Arch where the locale is often expected to be configured by the user, you can configure your locale to be non-UTF-8. So this is something to check; can you type You can see more about the locales on Arch on the Arch Wiki Locale page. I imagine that this is a locale-related issue, and that Python is trying to use UTF-8 when opening the file, but Steam is using an alternative locale and trying to use ISO-8859. From a development perspective, I'm not sure if this is something ProtonUp-Qt should handle. On one hand, Steam appears to respect the system locale. On the other hand, Python should be doing that but it appears that it still tries to use UTF-8 to open the file. I wonder if there's a way we can get a file locale and then pass that to |
My |
It might be worth trying to enable a UTF-8 fallback. I'm not too sure of all the specifics around this, but it does seem odd to me that Steam is writing the file as what is guessed to be ISO-8859, and that this also happens to be a common non-UTF-8 locale. It seems Python is assuming UTF-8 when that is clearly not the case, and Python should be making this determination based on your system locale settings. We already know that the Flatpak is returning If this also returns |
I must apologize that I didn't realize that I missed typing the Flatpak version of Steam which I am using. I think I've fixed it thanks to you. I removed # from I do not understand why Steam chose to use ISO instead of UTF-8. That's strange... I hope they change to UTF-8. Thank you! |
I'm not sure why Steam uses ISO either, but I did check and I have both the ISO and UTF-8 locale enabled on my system. My install is from a long time ago so I'm not sure why I have it set up this way. I'm glad it's resolved though! Maybe you should report this upstream, even just to ask and maybe get a clearer answer on what is going on? That should clear up whether it's expected that both locales are enabled, and/or if it is expected that Steam should not use UTF-8. To me it isn't clear from reading around that both locales should be enabled, but I also had both enabled, so I'm not sure if I read something a long time ago when I set up this installation 😅 I'm not sure what my other devices have, but I would wager since ProtonUp-Qt works fine on those devices that they have both locales set up as well (if that is indeed the root cause). I would be interesting to know what the Steam Deck uses, since at launch it had complaints about misconfigured locales that appear to be resolved now. If you want to report it (although you don't have to!) you're probably best reporting it on the Steam Flatpak repo for now and reporting further upstream to Valve if this is a general thing with Steam that you'd like to see changed. It is worth noting that the Steam Flatpak is entirely unofficial, and it is known to have a few oddities. Valve do label issues on the Steam for Linux issue tracker when they are experienced with Steam Flatpak, but to my understanding they only directly develop and maintain the Steam |
After reading the Steam Wiki from Arch Linux carefully https://wiki.archlinux.org/title/Steam I didn't realize that in the Installation section under "In order to run Steam on Arch Linux:" it states:
So I proceeded to uninstall Steam Flatpak and eliminate the directory (games are on another SSD) and redid the |
No problem at all, thank you for the follow-up here! I didn't realise this myself either (I guess I had this a long time ago? Unsure, it has been many years since i did this installation so I'm not sure what past-sonic2kk did 😅) but those steps sound reasonable and that seems like a very little-known step. Particularly if you're not using an en_US locale it would not be obvious to me to include that. Hopefully if anyone hits this in future this can bring a bit of visibility to the issue, so thank you as well 😄 |
Interesting, learned something new again.
Good to hear it is fixed, thanks for helping! I will close this issue. |
I also have this issue, I'm on Manjaro. My flatpak install of protonup was working fine and then it just stopped working a couple of weeks ago. I followed the directions and found that all of my locales were still configured correctly with en_US.UTF-8 |
I don't think after discussion that this is a ProtonUp-Qt issue but still boils down to some kind of system configuration issue. It might be good to ask on the Manjaro forums and see if they can help troubleshoot what is likely still some kind of locale issue. Perhaps Valve have changed something here recently? I'm not sure, I never had any issues like this with my ProtonUp-Qt installation. It would also be interesting if you can check if this happens with the ProtonUp-Qt 2.10.2 AppImage, just in case some updated dependencies fix the issue. |
Same issue with the v2.10.2 appimage FYI. |
Same issue on Linux Mint 21.2 |
A similar issue was reported for the vdf dependency back in 2019 and was fixed by replacing import vdf
config_vdf_file = "~/.steam/root/config/config.vdf" # or similar
# OLD CODE
data = vdf.load(open(config_vdf_file))
# SUGGESTION
with open(config_vdf_file, "r", encoding="utf-8", errors="replace") as f:
data = vdf.loads(f.read()) Can someone test the code snippets with their corrupted config file and share the results? |
@DavidoTek that is the fix In file ProtonUp-Qt/pupgui2/steamutil.py
to
It does load the application and it appears to work. But then the game list will be empty and in the console it will show this many times: |
Thanks for testing! Now we are a step further. I haven’t checked that yet but I think the error still appears because there are multiple places in the code where We should add a function like |
Please fill out following when reporting a new bug:
Describe the bug
When I launch ProtonUp-Qt (Flatpak) I keep getting a UnicodeDecodeError. I also tried to launch it in terminal and still get the UnicodeDecodeError. Prior to a couple of days, I didn't have this problem at all and was able to launch it.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):
Terminal output
The text was updated successfully, but these errors were encountered: