I found that after a power outage an active Tilt session would not load. When the server was rebooted the session would show as active but no data was on the graph.
I found that this was due to NULL characters being at the end of the log file.
Since there was already a recover_incomplete_session function, to resolve this issue I added an endswith for NULL (\x00) which reverse strips them and fixes an open comma which recovers the session properly.
With this update a corrupted file is automatically recovered properly.
I found that after a power outage an active Tilt session would not load. When the server was rebooted the session would show as active but no data was on the graph.
I found that this was due to NULL characters being at the end of the log file.
Since there was already a recover_incomplete_session function, to resolve this issue I added an endswith for NULL (\x00) which reverse strips them and fixes an open comma which recovers the session properly.
With this update a corrupted file is automatically recovered properly.
Here is a example of a corrupted session file. It has been renamed from .json to .txt so I could upload it. 20210807_164541#Orange-C71885D66A9C.txt