It used to be the case that the SDK could write to ~/.rai/tokens.json no problem because that folder already had to exist for the config setup to work. But now that that folder may be missing, you can end up getting warnings all over the place in code that depends on the SDK (for example, PyRel).
This fix simply checks whether the directory exists before writing the cache and creates it if necessary.
It used to be the case that the SDK could write to
~/.rai/tokens.json
no problem because that folder already had to exist for the config setup to work. But now that that folder may be missing, you can end up getting warnings all over the place in code that depends on the SDK (for example, PyRel).This fix simply checks whether the directory exists before writing the cache and creates it if necessary.