Very strange problem on Lutris startup

This PC is running a new Arch install and I’ve installed Lutris for the first time on it, but when I run it and attempt to log in, the program spits out a message saying it can’t connect to lutris.net. I’ve run it in console with the -d arg and here’s the output:

INFO 2019-11-14 23:39:09,352 [application.do_command_line:225]:Running Lutris 0.5.3
INFO 2019-11-14 23:39:09,352 [startup.check_driver:54]:Using NVIDIA drivers 440.31 for x86_64
INFO 2019-11-14 23:39:09,352 [startup.check_driver:58]:GPU: GeForce GTX 1080
INFO 2019-11-14 23:39:09,352 [startup.check_driver:73]:GPU: 10DE:1B80 1458:3748 using nvidia drivers
INFO 2019-11-14 23:39:09,373 [startup.check_vulkan:129]:Vulkan is supported
INFO 2019-11-14 23:39:09,374 [dxvk.get_dxvk_versions:21]:Updating DXVK versions
ERROR 2019-11-14 23:39:09,542 [jobs.target:32]:Error while completing task <bound method RuntimeUpdater.update of <lutris.runtime.RuntimeUpdater object at 0x7fb098e368e0>>: module ‘platf
orm’ has no attribute ‘dist’
<class ‘AttributeError’> module ‘platform’ has no attribute ‘dist’
INFO 2019-11-14 23:39:09,542 [lutriswindow.toggle_connection:580]:Connected to lutris.net as daruna
File “/usr/lib/python3.8/site-packages/lutris/util/jobs.py”, line 30, in target
result = self.function(*args, **kwargs)
File “/usr/lib/python3.8/site-packages/lutris/runtime.py”, line 143, in update
for remote_runtime in self._iter_remote_runtimes():
ERROR 2019-11-14 23:39:09,543 [jobs.target:32]:Error while completing task <function sync_from_remote at 0x7fb098eeb4c0>: module ‘platform’ has no attribute ‘dist’
File “/usr/lib/python3.8/site-packages/lutris/runtime.py”, line 152, in _iter_remote_runtimes
request = http.Request(RUNTIME_URL)
<class ‘AttributeError’> module ‘platform’ has no attribute ‘dist’
File “/usr/lib/python3.8/site-packages/lutris/util/http.py”, line 48, in init
self.headers = {“User-Agent”: self.user_agent}
File “/usr/lib/python3.8/site-packages/lutris/util/http.py”, line 64, in user_agent
PROJECT, VERSION, " ".join(platform.dist()), platform.machine()
File “/usr/lib/python3.8/site-packages/lutris/util/jobs.py”, line 30, in target
result = self.function(*args, **kwargs)
File “/usr/lib/python3.8/site-packages/lutris/sync.py”, line 87, in sync_from_remote
remote_library = api.get_library()
File “/usr/lib/python3.8/site-packages/lutris/api.py”, line 86, in get_library
request = http.Request(url, headers={“Authorization”: "Token " + credentials[“token”]})
File “/usr/lib/python3.8/site-packages/lutris/util/http.py”, line 48, in init
self.headers = {“User-Agent”: self.user_agent}
File “/usr/lib/python3.8/site-packages/lutris/util/http.py”, line 64, in user_agent
PROJECT, VERSION, " ".join(platform.dist()), platform.machine()
INFO 2019-11-14 23:39:09,720 [dxvk.get_dxvk_versions:21]:Updating D9VK versions

Here is the output the json file generated with --submit-issue: https://paste.ubuntu.com/p/67V25T9PfF/

I couldn’t include it in the original post because the forum told me I’m only allowed two links as a new user (even though this was the first link I pasted?).

I have the same OS, same NVIDIA driver version, same stack trace. The problem appeared after upgrading lutris to 0.5.3-2, as I have another Arch Linux box with lutris-0.5.3.-1 where the error is not shown. However, this is not necessarily the lutris’ fault.

PS: You already have two URLs in your initial post - lutris dot net appears twice.

ANALYSIS
The error which stands out is:

module ‘platform’ has no attribute ‘dist’

Seems that this method is deprecated.

According to this post another mehod has been deprecated since Python version 3.7. This other method in the platform module: platform.linux_distribution().

Back to platform.dist:
The call is made in this file:

/usr/lib/python3.8/site-packages/lutris/util/http.py : line 64

OBSERVATION
On my Fedora system I’m running Python 3.7 and thus the path to this file is not 3.8 but 3.7:

/usr/lib/python3.7/site-packages/lutris/util/http.py

INITIAL CONCLUSION
So it seems that you have Python3.8 installed and in this version platform.dist has been removed. Version 3.7 still has it because its working on my Fedora machine.

This is something the devs need to know…
Because with the latest distros, the latest versions of Python will be installed.

WHAT TO DO
I think you should be able to install version 3.7 next to 3.8. I see 3.6, for instance, in my repositories. Same counts for 3.8 which I haven’t installed. Each Python install has its files in its own directories.

You can start lutris with a specific version of python as follows:

python3.7 /usr/bin/lutris

Following the other thread, I installed the git version from AUR instead, and that got me beyond my initial problem. However, now when I try to install Starcraft via Lutris, I am getting what seems to be a similar problem to my first one, again seemingly involving python:

2019-11-15 21:42:12,329: Getting runner information for wine(version: tkg-4.0-x86_64)
2019-11-15 21:42:14,647: Extraction failed: Compressed file ended before the end-of-stream marker was reached
Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/lutris/util/extract.py”, line 114, in extract_archive
_do_extract(path, temp_path, opener, mode, extractor)
File “/usr/lib/python3.8/site-packages/lutris/util/extract.py”, line 167, in _do_extract
handler.extractall(dest)
File “/usr/lib/python3.8/tarfile.py”, line 2026, in extractall
self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
File “/usr/lib/python3.8/tarfile.py”, line 2067, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File “/usr/lib/python3.8/tarfile.py”, line 2139, in _extract_member
self.makefile(tarinfo, targetpath)
File “/usr/lib/python3.8/tarfile.py”, line 2188, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File “/usr/lib/python3.8/tarfile.py”, line 247, in copyfileobj
buf = src.read(bufsize)
File “/usr/lib/python3.8/lzma.py”, line 200, in read
return self._buffer.read(size)
File “/usr/lib/python3.8/_compression.py”, line 68, in readinto
data = self.read(len(byte_view))
File “/usr/lib/python3.8/_compression.py”, line 99, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
2019-11-15 21:42:14,648: Failed to extract the archive /home/shane/.cache/lutris/wine-tkg-4.0-x86_64.tar.xz file may be corrupt
2019-11-15 21:42:14,648: Failed to extract /home/shane/.cache/lutris/wine-tkg-4.0-x86_64.tar.xz: Compressed file ended before the end-of-stream marker was reached

Hi. This is a bug with python 3.8.

https://bugs.archlinux.org/task/64503?string=lutris&project=5&type[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=

Using now Lutris from AUR:
https://aur.archlinux.org/packages/lutris-git/

Problem solved.

No it’s not, the problem persists even with the git build but with a new error as posted above.

I built Python 3.7.5 from source (AUR helper was giving me grief) and when I try to run python3.7 /usr/bin/lutris I get the following error:

Traceback (most recent call last):
File “/usr/bin/lutris”, line 34, in
from lutris.gui.application import Application
ModuleNotFoundError: No module named ‘lutris’

I have almost no idea what I’m doing but I tried to search for a lutris module with pip3.7 and it can’t find anything of the sort:

shane@archPC ~/Programs/Python-3.7.5 $ pip3.7 install lutris
Collecting lutris
ERROR: Could not find a version that satisfies the requirement lutris (from versions: none)
ERROR: No matching distribution found for lutris

After this I thought to copy the entirety of the python 3.8 site-packages to the 3.7 directory, to see if that would work:

shane@archPC ~ $ sudo cp -r /usr/lib/python3.8/site-packages/* /usr/local/lib/python3.7/site-packages/

sure enough, it got past the original problem, but of course there is a new one:

shane@archPC ~ $ python3.7 /usr/bin/lutris
Traceback (most recent call last):
File “/usr/bin/lutris”, line 34, in
from lutris.gui.application import Application
File “/usr/local/lib/python3.7/site-packages/lutris/gui/application.py”, line 26, in
import gi
File “/usr/local/lib/python3.7/site-packages/gi/init.py”, line 42, in
from . import _gi
ImportError: cannot import name ‘_gi’ from ‘gi’ (/usr/local/lib/python3.7/site-packages/gi/init.py)

And that’s the extent of what I know to do here. Any help would be great

Ok that wont fly. When you install the package these directories are created against the Python you’ve got installed. Just copying the 3.8 files over in a 3.7 directory will give you problems. I would remove the 3.7 directory to prevent future problems.

For now I advice you to run lutris locally. I would go for the master branch at github.

Follow these steps:

  1. Open a terminal;
  2. Enter the following commands:

Taken from the install guide: https://github.com/lutris/lutris/blob/master/INSTALL.rst

cd /home/[username]/[anything-of-your-liking-here]/
# This will be the location from where you will run lutris
git clone https://github.com/lutris/lutris
# This will pull all sources from github to your local drive
cd lutris
# Change directory
./bin/lutris
# Launch lutris
  1. When it runs: great! Use this until the people who created the AUR package to submit a new one.

Hope this helps.

I removed the old python3.7 build with the site packages and rebuild from source just to be sure everything was back to normal. I then followed your instructions and cloned from git to my PC, and the problem still persists:

shane@archPC ~/Programs/lutris $ python3.7 ~/Programs/lutris/bin/lutris
Traceback (most recent call last):
File “/home/shane/Programs/lutris/bin/lutris”, line 34, in
from lutris.gui.application import Application
File “/home/shane/Programs/lutris/lutris/gui/application.py”, line 26, in
import gi
ModuleNotFoundError: No module named ‘gi’
shane@archPC ~/Programs/lutris $ ./bin/lutris
Traceback (most recent call last):
File “./bin/lutris”, line 34, in
from lutris.gui.application import Application
File “/home/shane/Programs/lutris/lutris/gui/application.py”, line 26, in
import gi
ModuleNotFoundError: No module named ‘gi’

When run with python3.8 it at least starts but the earlier problem posted above shows itself.

I guess I will wait for a new build to be released.

Ok, good that you reverted to a stable situation.

I believe you need this package: python-gobject

sudo pacman -S python-gobject gtk3

From:
https://pygobject.readthedocs.io/en/latest/getting_started.html#arch-getting-started

The package python-gi is part of python-gobject:
https://www.archlinux.org/packages/extra/x86_64/python-gobject/files/

You can see the list of dependencies lutris needs here:

I already had those packages installed…:

warning: python-gobject-3.34.0-3 is up to date – reinstalling
warning: gtk3-1:3.24.12+32+g39e28ab933-1 is up to date – reinstalling
resolving dependencies…
looking for conflicting packages…

…but reinstalled them anyway. I also watched the python 3.7 site-packages while I reinstalled these packages and noted that there were no changes, no new directories created. I think the problem here is that pacman is only concerned with the official python build, which in this case is 3.8 (one of the problems with Arch, it doesn’t retain old versions in repo), which does nothing for my problem sadly. Building Python 3.7 from source simply doesn’t include anything other than the bare essentials, and any user-friendly way to add things onto it (i.e., things I am capable of doing on my own) will only work for the newest version of Python.

I do appreciate your help though, tfk!

You started lutris with 3.7. I should focus on getting it to work on 3.8. One thing at the time and de master build has solved the original problem with 3.8.

What happens when you just run ~/Programs/lutris/bin/lutris?

If it doesn’t run: Do you have a python-gi or python3-gi package available in your repositories?

Running the cloned lutris build like that reproduces the error found in post #5 and #7: the program starts but no runners can be downloaded.

The streaming error?

Ok. That’s part two of the problem. Lutris probably runs now. That’s good.

Does this file still exist?
/home/shane/.cache/lutris/wine-tkg-4.0-x86_64.tar.xz

If so: delete it and try again.

Nope, doesn’t exist. There’s a checkbox option when canceling the runner download (after it errors out like in post #7) which deletes the unfinished downloads and I’ve been using that, and it clearly seems to be working properly.

Hm.

Runners are defined here BTW:
https://lutris.net/api/runners/wine

Could you try and download this one via the browser?
https://lutris.nyc3.cdn.digitaloceanspaces.com/runners/wine/wine-tkg-4.0-x86_64.tar.xz

So we can be sure that the connection in itself is OK…

That file fails to download, actually. It fails at the 8mb mark and Chromium calls it an “unknown error.”

edit: I’ve tested this download on a Windows 10 machine and it fails there also, but I tested it on my phone over LTE and it completes just fine :thinking:

So it seems something about my home network is causing this to fail to download?

Yes it seems so. Now the question remains: why…

edit: these files are hosted at digitaloceanspaces.com. I see some complaints on the net by people having issues with connectivity.

Is there anything I can do about this?