Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show full error message for missing weights #330

Merged

Conversation

danielhuppmann
Copy link
Member

While working on the ECEMF-workflow migration, I realized that showing the full log message from the "missing-weights" error from pyam was really too much in the nomenclature output...

@danielhuppmann danielhuppmann self-assigned this Feb 19, 2024
Copy link
Contributor

@phackstock phackstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me in principle but if I remember correctly I put the full error there so I would get the complete output of all the missing values making it easier for debug.
I can of course also see the need for just getting a compact list.

@danielhuppmann
Copy link
Member Author

But the error message only shows the first few lines anyway, and in this way, it's not really helpful...
image

@phackstock
Copy link
Contributor

Ah I see, not super useful indeed if there's lots of things missing. I'd still want a way to know exactly what's missing though. Maybe something like this:

missing for
WITCH 5.4, DIAG-BASE, CANADA, [2005, 2010, 2015, 2020]
WITCH 5.4, DIAG-BASE, BRAZIL, [2005, 2010, 2015, 2020]
...

where the years are compacted

@danielhuppmann
Copy link
Member Author

We can think of a more useful way for reporting missing weights later, merging this now for more readable log-output for now.

@danielhuppmann danielhuppmann merged commit 346b17f into IAMconsortium:main Mar 6, 2024
8 checks passed
@danielhuppmann danielhuppmann deleted the logging/missing-weights branch March 6, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants