Skip to content
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

Keyerrors 'name' and 'userconfig' on new package installation #273

Open
Atlas5976 opened this issue Jan 8, 2024 · 4 comments
Open

Keyerrors 'name' and 'userconfig' on new package installation #273

Atlas5976 opened this issue Jan 8, 2024 · 4 comments

Comments

@Atlas5976
Copy link

Describe the bug
Unable to actually use protontricks as it seems to have issues upon selecting a steam installation.

To Reproduce
Steps to reproduce the behavior:

  1. enter command protontricks --gui
  2. select native steam installation

Expected behavior
Presumably, protontricks should begin scanning and identifying all installed games to populate its gui

System (please complete the following information):

  • Distro: Nobara 39
  • Protontricks installation method: package installer
  • Protontricks version: 1.10.5-1.fc39
  • Steam version: Default, up to date

Additional context

Protontricks was closed due to the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/protontricks/steam.py", line 231, in from_appmanifest
    name = app_state["name"]
           ~~~~~~~~~^^^^^^^^
KeyError: 'name'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/protontricks/cli/util.py", line 149, in wrapper
    return cli_func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/protontricks/cli/main.py", line 241, in main
    steam_apps = get_steam_apps(
                 ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/protontricks/steam.py", line 1253, in get_steam_apps
    steam_app = SteamApp.from_appmanifest(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/protontricks/steam.py", line 234, in from_appmanifest
    name = app_state["userconfig"]["name"]
           ~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'userconfig'


=============

Please include this entire error message when making a bug report.
Log messages:

Found Steam directory at /home/atlas/.local/share/Steam
Found Steam directory at /home/atlas/.var/app/com.valvesoftware.Steam/.local/share/Steam
Using 'yad' as GUI provider
Using default Steam Runtime at /home/atlas/.local/share/Steam/ubuntu12_32/steam-runtime
WINETRICKS environment variable is not available. Searching from $PATH.
Found 4 Steam library folders
Multiple compatdata directories found for app 2348590
Multiple compatdata directories found for app 1493710
@Matoking
Copy link
Owner

One of the appmanifest files doesn't seem to have a name field. Could you try running the following command? It should print the contents for any files that lack the field.

$ find ~/.steam/steam/steamapps -name "appmanifest_*.acf" -exec sh -c "cat {} | tr '\n' ' ' | grep -v '\"name\"'" \;

@Atlas5976
Copy link
Author

Atlas5976 commented Jan 12, 2024

"AppState" {    "appid" "20554559"      "Universe"      "1"     "installdir"    "ELDEN RING"    "StateFlags""1026" }
"AppState" {    "appid" "20561646"      "Universe"      "1"     "installdir"    "PAYDAY3"       "StateFlags""1026" }

I want to say these are two games whose drives I've changed by uninstalling and then redownloading, maybe in windows. Renaming/removing both appmanifest files allows protontricks to work.

@Matoking
Copy link
Owner

"AppState" {    "appid" "20554559"      "Universe"      "1"     "installdir"    "ELDEN RING"    "StateFlags""1026" }
"AppState" {    "appid" "20561646"      "Universe"      "1"     "installdir"    "PAYDAY3"       "StateFlags""1026" }

I want to say these are two games whose drives I've changed by uninstalling and then redownloading, maybe in windows. Renaming/removing both appmanifest files allows protontricks to work.

To clarify, are the game installations located in the same directory as the appmanifest files, or are they simply leftover files?

@Atlas5976
Copy link
Author

"AppState" {    "appid" "20554559"      "Universe"      "1"     "installdir"    "ELDEN RING"    "StateFlags""1026" }
"AppState" {    "appid" "20561646"      "Universe"      "1"     "installdir"    "PAYDAY3"       "StateFlags""1026" }

I want to say these are two games whose drives I've changed by uninstalling and then redownloading, maybe in windows. Renaming/removing both appmanifest files allows protontricks to work.

To clarify, are the game installations located in the same directory as the appmanifest files, or are they simply leftover files?

They were leftover files, it seems.

Matoking added a commit that referenced this issue Jan 16, 2024
Incomplete appmanifest files can apparently be left over from old
installations. Ignore such files and print a warning.

Fixes #273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants