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

Formatting of CMOR errors is broken #1492

Closed
schlunma opened this issue Feb 15, 2022 · 0 comments · Fixed by #1494
Closed

Formatting of CMOR errors is broken #1492

schlunma opened this issue Feb 15, 2022 · 0 comments · Fixed by #1494
Assignees
Labels
bug Something isn't working

Comments

@schlunma
Copy link
Contributor

#1296 introduced a new formatting of CMOR errors which appears to be broken, e.g.,

esmvalcore.cmor.check.CMORCheckError: Coordinate plevs has var name plev7 instead of plevThere were errors in variable clisccp:
 tau: standard_name should be atmosphere_optical_thickness_due_to_cloud, not NoneThere were errors in variable clisccp:
 clisccp: does not match coordinate rank

It looks like only the error messages are affected (I think a comma is missing), but it might be good to also check warnings and debug messages.

if self.has_errors():
msg = '\n'.join([
f'There were errors in variable {self._cube.var_name}:'
'\n '.join(self._errors),
'in cube:',
f'{self._cube}',
'loaded from file ' +
self._cube.attributes.get('source_file', ''),
])
raise CMORCheckError(msg)

It would be great to fix this before the release.

@schlunma schlunma added the bug Something isn't working label Feb 15, 2022
@schlunma schlunma added this to the v2.5.0 milestone Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants