Skip to content

Commit

Permalink
Temporary fix about invalid JSON history #526
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Feb 18, 2025
1 parent 109b457 commit d0d43b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion QuickOSM/ui/quick_query_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,15 @@ def update_history_view(self):
for file in files[::-1]:
file_path = join(historic_folder, file)
with open(file_path, encoding='utf8') as json_file:
data = json.load(json_file, object_hook=as_enum)

try:
data = json.load(json_file, object_hook=as_enum)
except Exception:
# TODO, the fix should be done when writing the JSON file as well
# Issue https://github.com/3liz/QuickOSM/issues/493
# Issue https://github.com/3liz/QuickOSM/issues/526
continue

name = data['file_name']

item = QListWidgetItem(self.dialog.list_historic)
Expand Down

0 comments on commit d0d43b4

Please sign in to comment.