https://kedro.org/ logo
#questions
Title
# questions
a

Artur Dobrogowski

01/16/2024, 6:24 PM
Is it me error or kedro error?
Copy code
File "/home/.../.cache/pypoetry/virtualenvs/...-py3.10/lib/python3.10/site-packages/kedro/io/data_catalog.py", line 87, in _resolve_credentials
    return {k: _map_value(k, v) for k, v in config.items()}
AttributeError: 'str' object has no attribute 'items'
with versions:
Copy code
kedro==0.18.14
kedro-datasets==2.0.0
kedro-viz==7.0.0
1
d

datajoely

01/16/2024, 6:25 PM
so your credentials are not a dictionary
Copy code
credentials: a # this is as string
whereas
Copy code
credentials: # this is a dictionary
   my_key: a
a

Artur Dobrogowski

01/16/2024, 6:26 PM
Thanks, will look into that
I didnt touch credentials but migrated to omegaconf, maybe theres some difference
d

datajoely

01/16/2024, 6:27 PM
there shouldn’t be
but that is odd
a

Artur Dobrogowski

01/16/2024, 6:28 PM
I don't believe I even use credentials
but I'm not sure
d

datajoely

01/16/2024, 6:34 PM
oh that might be it! Do you have an empty credentials file?
a

Artur Dobrogowski

01/16/2024, 6:34 PM
no
I've searched everything with keyword credentials, both files and content and nothing relevant shows up
d

datajoely

01/16/2024, 6:36 PM
🤔 I’m not sure
will have to escalate
a

Artur Dobrogowski

01/16/2024, 6:41 PM
Here's full traceback
Looking at it I noticed that it references some local
cli.py
perhaps a relict from kedro before version 17
I'll figure if thats the cause
I've removed it but the error is the same
d

datajoely

01/16/2024, 6:46 PM
Have you gone straight for 0.17.x to 0.19.x?
a

Artur Dobrogowski

01/16/2024, 6:46 PM
no, I'm at 0.18.14
d

datajoely

01/16/2024, 6:46 PM
ok
a

Artur Dobrogowski

01/16/2024, 7:09 PM
hmm so I've checked what changed and I had old
cli.py
with which it was working and now it's not with the error above. Probably something is providing invalid credentials somewhere but I'm not sure how to find it.
any ideas how to debug this? like start kedro session in jupyter and check out what credentials are loaded?
my suspicion would be aronud anything related to Credentials in settings.py
After some debugging I see it fails on loading catalog template value:
Copy code
conf/env1/catalog_buckets.yml
1:ref_folder: "<s3a://kedrobucket/foobar/data/00_ref>"
is this the case that in OmegaConfigLoader all templated values need to be prefixed with _?
n

Nok Lam Chan

01/16/2024, 11:29 PM
Do you have some credentials which should be a dict but you supply a str value instead? (just guessing from the error)
a

Artur Dobrogowski

01/18/2024, 6:26 PM
Yes it was the issue I've described, OmegaConfigLoader required
_
prefix.