does not close on windows because docks_frozen setting missing and bug in log statement

Bug #1871057 reported by Johannes Schuh on 2020-04-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Undecided
Unassigned

Bug Description

OS: Win10 1909 x64
Installer
2.5.1

Log:
 main_window:INFO ---------------- Shutting down -----------------
  exceptions:ERROR Unhandled Exception
Traceback (most recent call last):
  File "C:\Program Files\OpenShot\windows\main_window.py", line 135, in closeEvent
    self.save_settings()
  File "C:\Program Files\OpenShot\windows\main_window.py", line 2112, in save_settings
    s.set('docks_frozen', self.docks_frozen)
  File "C:\Program Files\OpenShot\classes\settings.py", line 76, in set
    list(self._data.keys())))
AttributeError: 'list' object has no attribute 'keys'

Broken Stuff:
        # Save setting
        if key in user_values:
            user_values[key]["value"] = value
        else:
            log.warn("{} key '{}' not valid. The following are valid: {}".format(self.data_type, key,
                                                                                 list(self._data.keys())))

Fixed Stuff:
        # Save setting
        if key in user_values:
            user_values[key]["value"] = value
        else:
            log.warn("{} key '{}' not valid. The following are valid: {}".format(self.data_type, key,
                                                                                 ', '.join([i['setting'] for i in self._data])))

Johannes Schuh (schuhj) on 2020-04-06
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers