Open Spreadcat opened 8 months ago
It would be good to know the "certain conditions" that led to the error.
Can you provide the steps to reproduce it? What is the output when you add the :debug
hint to the failing command?
I know "certain conditions" would came back right at me. I meant the situation where I inlcude ":week" into the command. I'll test this on a container and provide steps on how to reproduce.
The output with the ":debug" attached
$ tm s :week :debug
CLI Parser
_original_args
timew s :week :debug
_args
word basename='timew' raw='timew' BINARY
word canonical='summary' raw='s' ORIGINAL EXT
word canonical=':week' raw=':week' ORIGINAL HINT FILTER
word canonical=':debug' raw=':debug' ORIGINAL HINT FILTER
>> Hint :day expanded to 2024-01-20T00:00:00 - 2024-01-21T00:00:00
>> Hint :week expanded to 2024-01-15T00:00:00 - 2024-01-22T00:00:00
>> 2024-01.data: 41 intervals
>> Loaded 18 tracked intervals
timew: /builddir/build/BUILD/timew-1.7.0/src/Range.cpp:358: time_t Range::total() const: Assertion `is_open () || end >= start' failed.
Aborted (core dumped)
I think I found a way to reproduce the issue:
with this data (only two lines required) the issue can be reproduced:
inc 20240116T181659Z - 20240116T151438Z # work
inc 20240117T073000Z - 20240117T150352Z # work
The issue is that the first line contains a timestamp earlier than the starting time. I'm not sure how I ended up with this line. I certainly cannot exclude any manual editing of the file, though -> Then I am probably the one to blame for this error.
Since I now know now how to find and fix this problem, I guess the issue can be closed. Alternatively you can use this to add a check/error-message to check for this constelation, caused by idiots like me typing in the wrong timestamps manually.
Adding a error message with a hint to this probable cause might be something to consider... 🤔
Hi there,
Under certain conditions and not related all commands, I get an error message as output. For Example:
When I run
timew s :week :ids
I should get the normal summary output. Instead I getMore information:
:week
, the command is working.:week
with:lastweek
, the command is working. I could not find any other way to reproduce the problem than to include:week
.timewarrior.cfg
file of any entries and the error persists.