VEuPathDB / EdaSubsettingService

A REST service to provide data and subsetting in the Exploratory Data Analysis Workspace
Apache License 2.0
0 stars 0 forks source link

Date histogram on subsetting tab gives 500 error if all data has been filtered out #39

Closed SheenaTomko closed 3 years ago

SheenaTomko commented 3 years ago

Ex: In PRISM2, if you filter on Age group "<5 years" then look at Death date or Withdrawal date 2, you get a 500 error rather than a plot with all data greyed out. Other date variables like "Withdrawal date" or "Household data collection date" look fine

Screen Shot 2021-10-08 at 10 32 47 AM
d-callan commented 3 years ago

partial stack: java.lang.NullPointerException: temporal at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?] at java.time.format.DateTimeFormatter.formatTo(DateTimeFormatter.java:1843) ~[?:?] at java.time.format.DateTimeFormatter.format(DateTimeFormatter.java:1822) ~[?:?] at org.veupathdb.service.eda.ss.service.RequestBundle.formatDate(RequestBundle.java:207) ~[service.jar:1.0.0] at org.veupathdb.service.eda.ss.model.distribution.DateBinDistribution$1.toHistogramStats(DateBinDistribution.java:121) ~[service.jar:1.0.0] at org.veupathdb.service.eda.ss.model.distribution.AbstractBinDistribution.processDistributionStream(AbstractBinDistribution.java:94) ~[service.jar:1.0.0] at org.veupathdb.service.eda.ss.model.distribution.AbstractDistribution.generateDistribution(AbstractDistribution.java:62) ~[service.jar:1.0.0] at org.veupathdb.service.eda.ss.service.StudiesService.processDistributionRequest(StudiesService.java:193) ~[service.jar:1.0.0] at org.veupathdb.service.eda.ss.service.StudiesService.postStudiesEntitiesVariablesDistributionByStudyIdAndEntityIdAndVariableId(StudiesService.java:112) ~[service.jar:1.0.0]

d-callan commented 3 years ago

i can fix this so you get the gray histogram, but you wont have any stats (bc there arent values to calculate them on) and no message as to why theyre missing currently. thats probably enough to close this ticket, and enough for phase 1? and then we open a separate phase 2 ticket, if wed like, for some sort of explanation to the user why the stats have disappeared?

SheenaTomko commented 3 years ago

I think that makes sense

SheenaTomko commented 3 years ago

Now an empty plot is showing up, but still no greyed out values.

Screen Shot 2021-10-12 at 9 36 22 AM
ryanrdoherty commented 3 years ago

Cannot reproduce. On qa.clinepidb.org, I get the grey bars again with no error.

Screen Shot 2021-10-12 at 12 05 40 PM
ryanrdoherty commented 3 years ago

@SheenaTomko Can you try again?

SheenaTomko commented 3 years ago

Looks good now. Closing and marking as complete. (I swear, sometimes even if I clear the metadata cache and clear my own cache before checking, things look wrong the first time but fixed later)