Waishnav / Watcher

Minimal open source Screen-Time Tracker for Linux
https://watcher-org.github.io/Watcher
MIT License
139 stars 11 forks source link

ValueError in week summary #7

Closed ethanmlee closed 2 years ago

ethanmlee commented 2 years ago

logs:

$ watcher -ws   
Traceback (most recent call last):
  File "/usr/share/Watcher/week_analysis.py", line 35, in <module>
    for x, y in rc.final_report(window_opened, time_spent).items():
  File "/usr/share/Watcher/report_creation.py", line 37, in final_report
    time = to.time_addition(j[1], time)
  File "/usr/share/Watcher/time_operations.py", line 36, in time_addition
    mn = int(b[3:5]) + int(a[3:5])
ValueError: invalid literal for int() with base 10: ':1'
Waishnav commented 2 years ago

It's occurring because of the time_differnce function in the time_operation.py file Forget to add one condition (if) for the difference in time between the new day and the previous day like ( 00:36 - 23:11 )

Waishnav commented 2 years ago

https://github.com/Waishnav/Watcher/commit/d5da5be46fb459959d64f52c310c8ab08163ae21 Last commit has solved this issue. So you can update Watcher now