Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Protontricks failing with AttributeError: 'NoneType' object has no attribute 'group' #42

Open
Kilinor opened this issue Dec 8, 2018 · 5 comments

Comments

@Kilinor
Copy link

Kilinor commented Dec 8, 2018

After running the command:
protontricks 359320 dotnet40 win7

I get the following response:
[INFO] Found Steam directory at /home/$USER/.steam/steam. You can also define Steam directory manually using $STEAM_DIR
[INFO] WINETRICKS environment variable is not available. Falling back to /usr/bin/winetricks
[INFO] Found 1 Steam library folders
Traceback (most recent call last):
File "/usr/bin/protontricks", line 310, in
steam_apps = get_steam_apps(steam_lib_dirs)
File "/usr/bin/protontricks", line 250, in get_steam_apps
steam_app = SteamApp.from_appmanifest(path)
File "/usr/bin/protontricks", line 93, in from_appmanifest
appid = int(re.search(r'(\t"appid"\s+")([0-9]+)', content).group(2))
AttributeError: 'NoneType' object has no attribute 'group'

@Kilinor
Copy link
Author

Kilinor commented Dec 8, 2018

This error occurs when one of the library paths is on an NTFS mount.

@cv-shiyanshi
Copy link

@Kilinor Hi,Can you share how do you solved it?

@nonchip
Copy link

nonchip commented Jul 9, 2019

this error just occured to me with none of the library paths being on an ntfs mount.

$ protontricks 551770 shell
[INFO] Found Steam directory at /home/kyra/.steam/steam. You can also define Steam directory manually using $STEAM_DIR
[INFO] WINETRICKS environment variable is not available. Falling back to /usr/bin/winetricks
[INFO] Found 0 Steam library folders
Traceback (most recent call last):
  File "/usr/local/bin/protontricks", line 316, in <module>
    steam_dir=steam_dir, steam_apps=steam_apps)
  File "/usr/local/bin/protontricks", line 163, in find_current_proton_app
    proton_appid = re.search(appid_regex, appinfo).group(2)
AttributeError: 'NoneType' object has no attribute 'group'

$ ls .steam/steam/steamapps/compatdata/551770/
pfx  pfx.lock  tracked_files  version

$ mount
(...)
/dev/mapper/vg_pool-lv_root on / type ext4 (rw,relatime)
(...)

interestingly it worked perfectly fine about a week ago.

if i had to guess i'd say valve might be updating their proprietary binary appinfo.vdf format from time to time, breaking compatibility? why do you need to parse that anyway? looks like you're just getting the proton version to use from there, and that's already in plain text in config.vdf (which btw you're also parsing wrong, but at least according to the comment you know that) under "CompatToolMapping"...

@cyro666
Copy link

cyro666 commented Jul 10, 2019

Yup, just happened to me as well. Used to work a few weeks ago. I just did a protontricks -c "pwd" 2100. Seems to only happen with some of the games, not all. Weird.

Judging by the fact that it just started to happen without me updating protontricks, I'd say the fault is probably in the way Steam works. They must have changed something. Or maybe it's because of python 3.7.3, but I doubt it.

@nonchip
Copy link

nonchip commented Jul 10, 2019

@cyro666 turns out just using the fork from https://github.com/Matoking/protontricks fixed it :P
this repo is not maintained anymore anyway, that's the one @Sirmentio recommends.

as for the reason: they have changed the way their appinfo.vdf cache file works, and this version essentially just greps (not really, but the equivalent in python) it and has a hardcoded offset it reads and then assumes automatic success, while the forked version parses that file a bit more robust.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants