Import Games dialog not opening (GOG Error 401)

When clicking on the Import Games link, nothing comes up.

Opening Lutris from command line, here’s the output:

2019-11-09 13:18:00,615: Failed to get token, check your GOG credentials
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/lutris/util/", line 72, in get
    request =, timeout=self.timeout)
  File "/usr/lib/python3.7/urllib/", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.7/urllib/", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/lutris/gui/", line 188, in <lambda>
    "sync-local": Action(lambda *x: self.open_sync_dialog()),
  File "/usr/lib/python3.7/site-packages/lutris/gui/", line 519, in open_sync_dialog
  File "/usr/lib/python3.7/site-packages/lutris/gui/widgets/", line 330, in __init__
    sync_row = ServiceSyncBox(service, self)
  File "/usr/lib/python3.7/site-packages/lutris/gui/widgets/", line 53, in __init__
  File "/usr/lib/python3.7/site-packages/lutris/gui/widgets/", line 144, in _connect_button_toggle
    if self.service.is_connected():
  File "/usr/lib/python3.7/site-packages/lutris/services/", line 256, in is_connected
    return GOG_SERVICE.is_available()
  File "/usr/lib/python3.7/site-packages/lutris/services/", line 70, in is_available
    user_data = self.get_user_data()
  File "/usr/lib/python3.7/site-packages/lutris/services/", line 169, in get_user_data
    return self.make_api_request(url)
  File "/usr/lib/python3.7/site-packages/lutris/services/", line 156, in make_api_request
  File "/usr/lib/python3.7/site-packages/lutris/util/", line 77, in get
    raise UnauthorizedAccess("Access to %s denied" % self.url)
lutris.util.http.UnauthorizedAccess: Access to denied

So looks like the GOG token might be expired? Is there any way to reset/delete that token?

Using version 0.5.3

There is a small icon in the corner of the game import dialog, GOG tab. It has a disconnect function when logged in, a connect function to login. When Lutris registeres the account as logged in you should be able to disconnect and reconnect by using this buttons.

Re-reading your comment, the whole window closes on you? That shouldn’t be happening in my opinion. When a server responds with an error the best way for a program is to catch it and to reset the interface to the connect state again. This way the user can re-login.

Yep, the dialog window does not open for me. It’s like clicking the “Import Games…” link does nothing.

But thanks for the hint about disconnecting, I read the source code and found the functionality, it removes some authentication files. Removed those files manually and now it works!

So in case somebody else has this issue, you need to remove these three files: