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

TypeError raised in get_results_for_interval #1834

Closed
iaindillingham opened this issue Dec 12, 2023 · 5 comments
Closed

TypeError raised in get_results_for_interval #1834

iaindillingham opened this issue Dec 12, 2023 · 5 comments
Labels
bug Something isn't working tech-support

Comments

@iaindillingham
Copy link
Member

iaindillingham commented Dec 12, 2023

analysis/measures_test_hi.py (here) passed locally but failed in production with a TypeError (here). Here

# Denominator cannot be None because population only includes rows where
# denominator is non-empty
totals[1] += denominator

totals[1] was of type int, but denominator was of type NoneType.

Thanks for reporting this, @alschaffer.

@iaindillingham iaindillingham added bug Something isn't working tech-support labels Dec 12, 2023
@inglesp inglesp moved this to Next in Data Team Dec 12, 2023
@iaindillingham
Copy link
Member Author

@alschaffer reports that this passed in production on second run.

@inglesp
Copy link
Contributor

inglesp commented Dec 12, 2023

Maybe the Python interpreter noticed this comment on its second run?

            # Denominator cannot be None because population only includes rows where
            # denominator is non-empty
            totals[1] += denominator

@evansd
Copy link
Contributor

evansd commented Dec 12, 2023

@alschaffer reports that this passed in production on second run.

Ah, crap. This is going to be a lot harder to debug if we can't reproduce.

@evansd
Copy link
Contributor

evansd commented Dec 12, 2023

Ah ha! The timing of this error (17:04) is suspiciously close to when Slack reported entering DB maintenance (17:40). And the assumption of logical consistency with respect to denominator not being NULL only holds if the data doesn't change between running the population query and running the final query.

There's a wider question here, which this ticket probably isn't the best place to discuss.

@evansd
Copy link
Contributor

evansd commented Dec 18, 2023

Closing in favour of above job-runner ticket and this isn't an ehrQL-specific issue.

@evansd evansd closed this as completed Dec 18, 2023
@github-project-automation github-project-automation bot moved this from Next to Done in Data Team Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech-support
Projects
Status: Done
Development

No branches or pull requests

3 participants