Enhance error when input files are not found#98
Conversation
|
Good work @schlunma. The PR runs as expected! I ran it and it outputs better error messages. I was thinking that the message: would be better if the filename and directory were combined. Ie: You could then copy and paste it into the command line and figure out whats the problem. Does that make sense? |
Yeah, makes perfectly sense, this is way better 😁 I will change it right now. |
|
Can we merge this? |
|
No, I want to have a look at the |
|
@bouweandela and meself had a discussion at the Workshop about |
|
quite a few conflicts tho, wouldn't want to be the one fixing them 🤣 |
|
@schlunma would you be a peach and fix the conflicts pls, then I'll approve and it'll be good to go 🍺 |
valeriupredoi
left a comment
There was a problem hiding this comment.
good to go by meself 🍺
|
Ahhh, now you were too fast, I wanted to add a test for the |
|
should be fine - can you add the test in a separate PR? That makes more sense since this dealt with printing messages only 🍺 |
This addresses an issue of @ledm's presentation at the workshop: Right now, the tool simply outputs
if it does not find input data. To get an idea of what went wrong, user's have to look at the debug log. Also, I think the attribute
filenamein the variable dictionary is very confusing, since it does only indicate the location of the file after preprocessing, which is definitely not useful here.The main changes are in the following code snippet. The text of the actual error messages themselves is of course open for discussion.
ESMValCore/esmvalcore/_recipe_checks.py
Lines 95 to 110 in b9d82b0