Closed andrei-a-papou closed 6 months ago
Strange, I can't reproduce it anymore... @vonshednob Can you?
OK, figured it out!
abc xyz 123 due:2024-12-12
<- this kind of task will trigger the bug
2023-01-01 abc xyz 123 due:2024-12-12
<- this kind of task will NOT trigger the bug
Missing creation date seems to be the culprit. I have tasks with and without it.
Thanks for investigating! I'll see how to fix this
I cannot reproduce the issue, but I cannot archive tasks either :sweat_smile: so I'm fixing that bug at least.
I also see how the bug that you describe could be triggered, but I don't understand how pter can get into this type of situation. I'll investigate some more.
Ah! I think I understand how this happened. Probably happened every 2nd time you try to archive a task; but the first time it doesn't actually archive it (because that was broken with an update to pytodotxt, I think).
The change is in how pter triggers the detection of a change in the task: task.parse("")
, but with a more recent version(?) of pytodotxt parsing an empty string would not cause any change in the description, thus the task appears unchanged → problems.
Anyway, appears to be fixed for both deletion and archiving (not released yet, but the changes are in the codeberg repo).
Probably happened every 2nd time you try to archive a task; but the first time it doesn't actually archive it
I think so, yes. Try to archive the first time -- nothing appears to happen. Try to do it a second time -- pter crashes.
but I don't understand how pter can get into this type of situation
I've migrated my todo.txt from another tool and some of my todos had missing creation dates. That may have been a factor.
Thanks for fixing it, I'll test the code soon.
Tested, seems to work fine, thank you!
When archiving or deleting, the task remains on screen, no message is printed in the status bar. If you hit the archive or delete shortcut again, pter v3.15.2 crashes with the following error:
~Archiving and deleting work OK in 3.13.0, but not in later releases.~ Nope, also broken.