Hello. Where would I go looking to find where the ...
# beginners-need-help
i
Hello. Where would I go looking to find where the params file is being read from disk? I'm having an issue with non-ASCII characters on Windows. I am saving my params.yml as UTF-8 encoding but python, taking locale.getpreferredencoding(), is attempting to read it using CP1252 which generates gibberish for characters like ñ, é etc. If I wanted to change the config of a YAMLDataSet I would change it like here: https://github.com/kedro-org/kedro/issues/772#issuecomment-847650332 but I don't know if there is a similar config for the parameters.yml file.
a
Hello @inigohrey. The code that does this is here: https://github.com/kedro-org/kedro/blob/main/kedro/config/common.py#L121-L122 Unfortunately it seems that we're already using UTF-8 though, so I'm not sure whether changing this would solve your problem 🤔
Although now I see it's doing
utf8
and not
utf-8
as we do elsewhere... maybe that's not actually working right.
My quick test suggests that
utf8
is fine, so I don't think that can be the problem here.
i
Thank you. I will look around there and try to pinpoint where the issue is cropping up. Will report back when I figure it out 😄
Issue probably caused by the fact that I'm running kedro 0.17.1 and that method in my installation seems to delegate opening the file to anyconf. Looking at the code it should be solved in
latest
as reading the file using
utf8
is working fine. Thanks for your help @antony.milne
a
Ahah, excellent! Thanks for letting us know