swar / Swar-Chia-Plot-Manager

This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.
GNU General Public License v3.0
1.26k stars 388 forks source link

analyze_logs() - ZeroDivisionError #1097

Open 350d opened 3 years ago

350d commented 3 years ago

I have 3 plots finished (following Telegram notifications - "You completed a plot on CHIA!") with SWAR already but none of the log files contains confirmation of that. Few logs finished with error of allocation or something. I've tried to start analyze_logs here:

PS C:\Users\Chia\SWAR> python manager.py analyze_logs Traceback (most recent call last): File "C:\Users\Chia\SWAR\manager.py", line 43, in <module> analyze_logs() File "C:\Users\Chia\SWAR\plotmanager\library\utilities\commands.py", line 194, in analyze_logs analyze_log_times(log_directory) File "C:\Users\Chia\SWAR\plotmanager\library\utilities\log.py", line 102, in analyze_log_times print(f' phase{phase}_line_end: {int(round(sum(line_numbers[phase]) / len(line_numbers[phase]), 0))}') ZeroDivisionError: division by zero

Looks like some plots are not finished, others finished with errors and default config numbers for lines simply not working. I guess SWAR can do better job here to parse exact strings in log for job status confirmation, like Copied final file from or Renamed final file from

350d commented 3 years ago

Well, right after I have full log in logs folder - analyze_logs was able to parse all data successfully