Open smalers opened 2 years ago
There are at least two problems:
DateTime
Excel integrationAwhile back I fixed bug in Excel integration where date/time objects were not being handled well. This caused an issue in later releases because a TSTool table has a column defined as type String
but a DateTime
is put into the column. Internally, the code was trying to cast to (String)
and because the types were different this failed. I changed to toString()
and it works.
Because of the year being analyzed, the "RecentPeriod" is zero length. This is the period after the historical period but before the current year. The math in the Config
worksheet results in RecentPeriodEndDate
being less than RecentPeriodStartDate
.
The time series iterators complain that the start is before the end. Some possible fixes are:
If
commands in the workflow to check for this situation and not try to calculate statistics in the recent period, since there is no recent period. I may need to enhance TSTool because I'm not sure if If
hands date/time comparisons especially when property types can get mixed up between string and date/time. It would be helpful to enhance the Results / Properties table to indicate the type of the property to help with troubleshooting. The downside to this is that what if the period is really messed up and needs to be fixed? Option 3 could handle that but has other repercussions.Config
worksheet to set RecentPeriodStartDate
and RecentPeriodEndDate
to be a different value in this case, even blank. The TSTool workflows would then need to react to that in the logic. Maybe need another configuration property that is RecentPeriodNumMonths
and if zero the workflow can handle.This is perhaps a bigger issue because it also impacts the recent period annotations on graphs so would need to handle there to make sure that products are not impacted.
This is a somewhat big problem
I'm building TSTool 14.3.0.dev1 now for Tracy to try.
Subject of the issue
TSTool is having errors writing SWSI (Surface Water Supply Index) output to the Excel file.
Environment
Steps to reproduce
I was provided with the current SWSI files for September of 2021. Running through the analysis steps has errors writing to the Excel files used to check input.