I came across an error that I didn't find helpful:
KeyError: "No variable named 'trace_huc02conus'. Did you mean one of ('trace_None',)?"
And it turned out to be an issue with the cache. When I did a run, I didn't include any regions and that run was cached as expected. But then after, I added regions, reran ilamb run, and it tried to use what it found in Reference.nc, but it was out-of-date at that point. I just had to delete _build and try again. Maybe this is something we could prevent in our code, but I thought in general we could add a new ILAMBException to exceptions.py and recommend users to delete their _build to reset the cache (or whatever is best):
class InvalidCache(ILAMBException):
"""Cached intermediate files do not match the current configuration."""
Then we could use it in _load_local_assets() inside run.py or wherever else.
I came across an error that I didn't find helpful:
And it turned out to be an issue with the cache. When I did a run, I didn't include any regions and that run was cached as expected. But then after, I added regions, reran
ilamb run, and it tried to use what it found in Reference.nc, but it was out-of-date at that point. I just had to delete_buildand try again. Maybe this is something we could prevent in our code, but I thought in general we could add a new ILAMBException to exceptions.py and recommend users to delete their _build to reset the cache (or whatever is best):Then we could use it in
_load_local_assets()insiderun.pyor wherever else.