atviriduomenys / spinta

Spinta is a framework to describe, extract and publish data (a DEP Framework).
MIT License
10 stars 4 forks source link

AttributeError on starting Spinta #590

Open sirex opened 3 months ago

sirex commented 3 months ago

When starting Spinta server spinta run, sometimes following error is raised:

Traceback (most recent call last):
  File "spinta/asgi.py", line 18, in <module>
    commands.check(context, config)
  File "multipledispatch/dispatcher.py", line 278, in __call__
    return func(*args, **kwargs)
  File "spinta/types/config.py", line 109, in check
    if config.default_auth_client and not client_name_exists(path, config.default_auth_client):
  File "spinta/auth.py", line 586, in client_name_exists
    if client in keymap.keys():
AttributeError: 'NoneType' object has no attribute 'keys'

After starting it again, error usually disappears.

It looks, that config/clients/helpers/keymap.yml becomes empty at the time when client_name_exists function is called. Maybe there is some raise condition is involved here.