Back to the main site

Lutris fail to launch - invalid syntax error

Seemingly out of the blue lutris stopped working. No updates or other changes. Using MXLinux.

Following is the output from lutis -d in terminal:

$ lutris -d
Traceback (most recent call last):
File “/usr/games/lutris”, line 52, in
from lutris.gui.application import Application # pylint: disable=no-name-in-module
File “/usr/lib/python3/dist-packages/lutris/gui/application.py”, line 39, in
from lutris.game import Game
File “/usr/lib/python3/dist-packages/lutris/game.py”, line 23, in
from lutris.runners import InvalidRunner, import_runner, wine
File “/usr/lib/python3/dist-packages/lutris/runners/wine.py”, line 9, in
from lutris.runners.commands.wine import ( # noqa: F401 pylint: disable=unused-import
File “/usr/lib/python3/dist-packages/lutris/runners/commands/wine.py”, line 16, in
from lutris.util.wine.prefix import WinePrefixManager
File “/usr/lib/python3/dist-packages/lutris/util/wine/prefix.py”, line 7, in
from lutris.util.wine.registry import WineRegistry
File “/usr/lib/python3/dist-packages/lutris/util/wine/registry.py”, line 9, in
from lutris.util.wine.wine import WINE_DEFAULT_ARCH
File “/usr/lib/python3/dist-packages/lutris/util/wine/wine.py”, line 9, in
from lutris.runners.steam import steam
File “/usr/lib/python3/dist-packages/lutris/runners/steam.py”, line 243
if library_config := self.get_library_config():
^
SyntaxError: invalid syntax

Any help would be appreciated.

OMZ

1 Like

I have the same issue

1 Like

Well, I got lutris to launch by rolling back to version 0.5.8.3 (from 0.5.9) That version (0.5.8.3) is the latest available in the MXLinux repositories. My memory may be at fault, I recall using the information on the lutris download page to update to the latest Debian compatible version from the OpenSUSE Build Service. That may be the source of my problem. Even though MXLinux is based on Debian seems safest to stick to its repositories for updates rather than a ‘foreign’ repository.

1 Like

I’m having a similar issue on Ubuntu 18.04 LTS (Kubuntu). (Edit: to be clear, the “issue” is the “SyntaxError: invalid syntax” error, posted by OP, that appears when running lutris -d after upgrading Lutris to 0.5.9. Lutris will not run on my Ubuntu 18.04 LTS system after upgrading Lutris to 0.5.9 and also ensuring that all other system updates are applied.)

This is just a guess, but I’m wondering if the syntax error is related to the Python version. The code triggering the syntax error may only be valid in Python >2.8. (The walrus operator ( := ) was introduced in 2.8, I think?) Ubuntu 18.04 LTS seems to only have Python 2.7.17 available in the standard repositories, not Python 2.8.

(I’m not suggesting that people run out and try updating their Python version to 2.8, because I honestly don’t know if that would help. But I want to throw that out there in case it helps lead us towards a solution.)

I have the same error on Ubuntu 18.04, this error is already shown on package installation:

lutris (0.5.9~ubuntu18.04.1) wird eingerichtet …
File “/usr/lib/python3/dist-packages/lutris/runners/steam.py”, line 243
if library_config := self.get_library_config():
^
SyntaxError: invalid syntax

dpkg: Fehler beim Bearbeiten des Paketes lutris (–configure):
»installiertes lutris-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
lutris
E: Sub-process /usr/bin/dpkg returned an error code (1)

I reverted back to the old version for now.

A possible fix seems to posted here: