You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Current error message
fromomegaconfimportOmegaConfinput="""a: a: a: ${..b}"""config=OmegaConf.create(input)
try:
OmegaConf.resolve(config)
exceptExceptionase:
print(e)
# >>> Interpolation key 'b' not found
We see that the dots / the relative path doesn't show up in the error message. This makes it really hard to debug not found keys.
Describe the solution you'd like
There are several ways to solve this problem and to improve the error message:
show the full path of the key that couldn't found, e.g. : Interpolation key 'a.b' not found
show the relative path of the key like in the interpolation: Interpolation key '..b' not found
show the nodes path, where the interpolation is defined, e.g: Interpolation key 'a.b' not found at node a.a.a
I would prefer a mix of these options, but I like option 3 the most, because there its clear which key is missing and where to look to fix the interpolation.
The text was updated successfully, but these errors were encountered:
MatteoVoges
changed the title
Improve error message for relative inteprolations
Improve error message for relative interpolations
Sep 22, 2023
Is your feature request related to a problem? Please describe.
Current error message
We see that the dots / the relative path doesn't show up in the error message. This makes it really hard to debug not found keys.
Describe the solution you'd like
There are several ways to solve this problem and to improve the error message:
Interpolation key 'a.b' not found
Interpolation key '..b' not found
Interpolation key 'a.b' not found at node a.a.a
I would prefer a mix of these options, but I like option 3 the most, because there its clear which key is missing and where to look to fix the interpolation.
The text was updated successfully, but these errors were encountered: