Installed a fresh install last night using ovos-installer on a Raspberry Pi 4 (Mark II).
Using ovos-logs slice, I would get this error:
File "/home/matt/.venvs/ovos/lib/python3.11/site-packages/ovos_utils/log_parser.py", line 372, in slice
if start <= log.timestamp < end:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'datetime.datetime' and 'str'
|
if start <= log.timestamp < end: |
So it seemed like log.timestamp wasn't a datetime.datetime.
I added debug info to identify problematic line(s):
for log in OVOSLogParser.parse_file(logfile):
if log.timestamp == "":
console.print(f"\n\nOut:{log}\n\n")
continue
if start <= log.timestamp < end:
When I ran ovos-logs slice next, before the logs showed I did find the debug line ran for 1 log entry:
Out:2024-07-17 21:59:57.530 - common_query.openvoiceos - INFO - First run of common_query.openvoiceos
NOTE: The prefix OUT: comes from my console.print.
So it just seems there's something wrong about this one line that ovos-logs couldn't handle.
That patch fixed it for me, but I'm:
- Not sure what's wrong with this line
- Unfamiliar with best practices on how to address this
I'm happy to make a PR if I get some feedback on how to address it.
Thanks y'all!
Installed a fresh install last night using ovos-installer on a Raspberry Pi 4 (Mark II).
Using
ovos-logs slice, I would get this error:ovos-utils/ovos_utils/log_parser.py
Line 372 in 95ec8f7
So it seemed like log.timestamp wasn't a datetime.datetime.
I added debug info to identify problematic line(s):
When I ran
ovos-logs slicenext, before the logs showed I did find the debug line ran for 1 log entry:NOTE: The prefix
OUT:comes from my console.print.So it just seems there's something wrong about this one line that ovos-logs couldn't handle.
That patch fixed it for me, but I'm:
I'm happy to make a PR if I get some feedback on how to address it.
Thanks y'all!