      """
      original_traceback = traceback.format_exc()
      path = os.path.dirname(os.path.realpath(sys.argv[0]))
      filename = os.path.join(path, datetime.now().strftime("crash_report.%Y.%m.%d.%H%M%S%f.log"))
      freeze_log = list(_DEBUG_BUFFER)
      try:
          from lib.sysinfo import sysinfo  # pylint:disable=import-outside-toplevel
      except Exception:  # pylint:disable=broad-except
          sysinfo = ("\n\nThere was an error importing System Information from lib.sysinfo. This is "
                     "probably a bug which should be fixed:\n{}".format(traceback.format_exc()))
 
</s> remove     with open(filename, "w") as outfile:
 </s> add     with open(filename, "wb") as outfile: </s> remove     original_traceback = traceback.format_exc()
 </s> add     original_traceback = traceback.format_exc().encode("utf-8") </s> remove     log_file = RotatingFileHandler(filename, backupCount=1)
 </s> add     log_file = RotatingFileHandler(filename, backupCount=1, encoding="utf-8") </s> remove         outfile.write(sysinfo)
 </s> add         outfile.write(sysinfo.encode("utf-8")) </s> remove             self.append(line + "\n")
 </s> add             self.append(f"{line}\n")
    freeze_log = [line.encode("utf-8") for line in _DEBUG_BUFFER]
      """
      original_traceback = traceback.format_exc()
      path = os.path.dirname(os.path.realpath(sys.argv[0]))
      filename = os.path.join(path, datetime.now().strftime("crash_report.%Y.%m.%d.%H%M%S%f.log"))
    freeze_log = [line.encode("utf-8") for line in _DEBUG_BUFFER]
      try:
          from lib.sysinfo import sysinfo  # pylint:disable=import-outside-toplevel
      except Exception:  # pylint:disable=broad-except
          sysinfo = ("\n\nThere was an error importing System Information from lib.sysinfo. This is "
                     "probably a bug which should be fixed:\n{}".format(traceback.format_exc()))
keep keep keep keep replace keep keep keep keep keep
 Bugfix - lib.logger - Force file writing to urf-8 
lib/logger.py