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

protontricks gives error when trying to run GUI #47

Closed
NodokaHanamura opened this issue Feb 2, 2020 · 11 comments
Closed

protontricks gives error when trying to run GUI #47

NodokaHanamura opened this issue Feb 2, 2020 · 11 comments

Comments

@NodokaHanamura
Copy link

NodokaHanamura commented Feb 2, 2020

I simply tried to run Protontricks (installed via pipx), and got this.

Traceback (most recent call last):
File "/home/nikki/.local/bin/protontricks", line 8, in
sys.exit(main())
File "/home/nikki/.local/pipx/venvs/protontricks/lib/python3.6/site-packages/protontricks/cli.py", line 150, in main
steam_lib_paths=steam_lib_paths
File "/home/nikki/.local/pipx/venvs/protontricks/lib/python3.6/site-packages/protontricks/steam.py", line 734, in get_steam_apps
os.path.join(path, "steamapps", "appmanifest_*.acf")
File "/usr/lib/python3.6/glob.py", line 20, in glob
return list(iglob(pathname, recursive=recursive))
File "/usr/lib/python3.6/glob.py", line 71, in _iglob
for dirname in dirs:
File "/usr/lib/python3.6/glob.py", line 71, in _iglob
for dirname in dirs:
File "/usr/lib/python3.6/glob.py", line 71, in _iglob
for dirname in dirs:
File "/usr/lib/python3.6/glob.py", line 72, in _iglob
for name in glob_in_dir(dirname, basename, dironly):
File "/usr/lib/python3.6/glob.py", line 83, in _glob1
return fnmatch.filter(names, pattern)
File "/usr/lib/python3.6/fnmatch.py", line 52, in filter
match = _compile_pattern(pat)
File "/usr/lib/python3.6/fnmatch.py", line 46, in _compile_pattern
return re.compile(res).match
File "/usr/lib/python3.6/re.py", line 233, in compile
return _compile(pattern, flags)
File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.6/sre_parse.py", line 855, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 765, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "/usr/lib/python3.6/sre_parse.py", line 416, in _parse_sub
not nested and not items))
File "/usr/lib/python3.6/sre_parse.py", line 553, in _parse
raise source.error(msg, len(this) + 1 + len(that))
sre_constants.error: bad character range D-1 at position 7

AFAIK, Python, steam and all other dependencies are up to date.

I am running Linux Mint 19.3, based on Ubuntu 18 "Bionic" on Linux Kernel 5.3.0.

@Matoking
Copy link
Owner

Matoking commented Feb 2, 2020

That's weird; my guess is that one of your Steam library paths has weird characters that are not playing nice with the glob module?

Could you run the following two commands in a new terminal and paste what it prints? It should print a list of your Steam library directories.

source ~/.local/pipx/venvs/protontricks/bin/activate
python -c "from protontricks.steam import find_steam_path, get_steam_lib_paths; steam_path, _ = find_steam_path(); print(get_steam_lib_paths(steam_path))"

@lucifertdark
Copy link

I'm getting the same error, here's what those commands print out for me...

['/home/rob/.steam/steam']

@Matoking
Copy link
Owner

Matoking commented Feb 2, 2020

I'm getting the same error, here's what those commands print out for me...

['/home/rob/.steam/steam']

What OS are you running? What is your Python version (check with python3 --version)?

@lucifertdark
Copy link

Those details would help. ;)
Ubuntu 19.10 with the 5.3.0 kernel & Python 3.7.5

Matoking added a commit that referenced this issue Feb 2, 2020
@Matoking
Copy link
Owner

Matoking commented Feb 2, 2020

I pushed a small update to re_debug branch that should print more information when the exception happens.

Install the test version with the following command, reopen the terminal and then try running the command that causes the crash and paste whatever it prints:

pipx install --force --spec git+https://github.com/Matoking/protontricks.git@re_debug protontricks

@lucifertdark
Copy link

lucifertdark commented Feb 2, 2020

That seems to have fixed it for me...
edit, nope it's happened again..........
protontricks --gui
Traceback (most recent call last):
File "/home/rob/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/gui.py", line 27, in select_steam_app_with_gui
], check=True, stdout=PIPE, stderr=PIPE)
File "/usr/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['zenity', '--forms', '--text=Steam Game Library', '--title=Choose Game', '--add-combo', 'Pick a library game', '--combo-values', "Acorn Assault: Rodent Revolution: 410290|Aegis Defenders: 371140|Auto Age: Standoff: 458680|Bad North: 688420|Blasphemous: 774361|Book of Demons: 449960|Brothers - A Tale of Two Sons: 225080|Californium: 402060|Castle of Illusion: 227600|Crysis: 17300|Crysis 2 Maximum Edition: 108800|Crysis Warhead: 17330|Dark Future: Blood Red States: 370870|Distrust: 635200|Divide by Sheep: 252130|EARTH'S DAWN: 494600|Emily Wants To Play: 416590|Fall of Light: Darkest Edition: 633950|Gauntlet™ : 258970|Grim Dawn: 219990|HITMAN™ 2: 863550|Hard Reset Redux: 407810|Heat Signature: 268130|INSIDE: 304430|Immortal Planet: 631980|In Fear I Trust: 522690|KHOLAT: 343710|Kathy Rain: 370910|Little Nightmares: 424840|MOTHERGUNSHIP: 574090|Mages of Mystralia: 529660|Morphies Law: 948960|My Memory of Us: 651500|My Time At Portia: 666140|Neighbours from Hell 2: 260770|Next Hero: 756490|Nexus: The Jupiter Incident: 6420|Non-Steam shortcut: Enter The Gungeon: 3853151923|Odallus: The Dark Call: 319480|Odyssey - The Invention of Science: 558110|Oozi: Earth Adventure: 257990|PLANET ALPHA: 485030|Pacify: 967050|Phantom Doctrine: 559100|Pixel Puzzles Traditional Jigsaws: 1058200|Pixel Puzzles Ultimate: 351030|Porcunipine: 352620|Pumped BMX Pro: 966720|Quantum Replica: 470090|Rebel Galaxy: 290300|Renoir: 496400|Republique: 317100|Rise of the Triad: 217140|STAR WARS™: The Force Unleashed™ Ultimate Sith Edition: 32430|Shadow Warrior 2: 324800|SimCity 4 Deluxe: 24780|Sine Mora EX: 606730|Sleeping Dogs: Definitive Edition: 307690|Space Rangers HD: A War Apart: 214730|Sparkle Unleashed: 550450|Styx: Master of Shadows: 242640|Styx: Shards of Darkness: 355790|The Deadly Tower of Monsters: 353700|The King's Bird: 812550|The Light Keeps Us Safe: 853240|The Sexy Brutale: 552590|The Spiral Scouts: 862480|The Surge: 378540|Thief: 239160|Unreal Tournament 3: Black Edition: 13210|Viscera Cleanup Detail: 246900|Warhammer: End Times - Vermintide: 235540"]' died with <Signals.SIGABRT: 6>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rob/.local/bin/protontricks", line 8, in
sys.exit(main())
File "/home/rob/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/cli.py", line 171, in main
steam_app = select_steam_app_with_gui(steam_apps=steam_apps)
File "/home/rob/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/gui.py", line 48, in select_steam_app_with_gui
raise RuntimeError("Zenity returned an error")
RuntimeError: Zenity returned an error

@Matoking
Copy link
Owner

Matoking commented Feb 2, 2020

That's a different error, although it should also be handled properly as of 24070b0.

You should still be getting the sre_constants.error: bad character range D-1 at position 7 error or something similar, as the change only prints more information when that error happens.

@lucifertdark
Copy link

I think my bug was caused by an outdated version of Winetricks, now updated, apologies for muddying the waters.

@Matoking
Copy link
Owner

Matoking commented Feb 3, 2020

@NodokaHanamura Please test the following test branch as described earlier:

pipx install --force --spec git+https://github.com/Matoking/protontricks.git@re_debug protontricks

I haven't been able to reproduce the error using either my own paths or what @lucifertdark provided, so it might be unique to your environment.

@NodokaHanamura
Copy link
Author

Sorry for the delay.

I've tried both commands you've given me and got the following output:

nikki@SENIORNEGI-Linux ~ $ pipx install --force --spec git+https://github.com/Matoking/protontricks.git@re_debug protontricks
usage: pipx [-h] [--version]
            {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall-all,list,run,runpip,ensurepath,completions}
            ...
pipx: error: unrecognized arguments: --spec protontricks
nikki@SENIORNEGI-Linux ~ $ source ~/.local/pipx/venvs/protontricks/bin/activate
(protontricks) nikki@SENIORNEGI-Linux ~ $ python -c "from protontricks.steam import find_steam_path, get_steam_lib_paths; steam_path, _ = find_steam_path(); print(get_steam_lib_paths(steam_path))"
['/home/nikki/.steam/steam', '/media/nikki/[HDD-1] HOME YUE/SteamLibrary', '/media/nikki/[HDD-3] HOME ZVEZDA/SteamLinux', '/media/nikki/[HDD-4] HOME POBEDA/!Linux', '/media/nikki/[HDD-6] HOME SHUTEN/SteamLibrary']

@Matoking
Copy link
Owner

Matoking commented Feb 4, 2020

Thanks for the help, I was able to reproduce the error and I've now fixed it in the master branch.

You can use the command in README to install the development version with the bug fix until a new release is made.

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

3 participants