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
Show head of duplicate rows in error message #373
Show head of duplicate rows in error message #373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
Do you know why Travis build failed?
|
||
if df.empty: | ||
logger.warning('Formatted data is empty!') | ||
|
||
return sort_data(df, idx_cols), time_col, extra_cols | ||
|
||
def _raise_data_error(msg, data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
re @zikolach
I think that this is due to a timeout for the IIASA server - the pyam tests are always a bit fickle since we have tests against the rest-api. Usually restarting the build on travis is enough. But that is one more reason why I wanted to run the tests against an integration-test instance rather than the iamc15 instance, hoping this would give faster response time. |
Thanks @danielhuppmann ! |
Please confirm that this PR has done the following:
Documentation AddedDescription of PR
Initializing an IamDataFrame with duplicate rows already raised an error. This PR extends the error message to include the head of the duplicate rows.
This came up as part of @zikolach and @vruijven working on the ixmp-server-integration pipeline and will hopefully simplify identifying the source of problematic data uploads.