Skip to content

Commit 1186237

Browse files
committed
fix s57 paths, add grib download error logging
1 parent d4de5f2 commit 1186237

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gweatherrouting/gtk/charts/vectordrawer/s57symbolprovider.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, settingsManager):
5454

5555
# Try to load cached data
5656
try:
57-
with open(DATA_DIR + "s57_symbols.json", "r") as f:
57+
with open(DATA_DIR + "/s57_symbols.json", "r") as f:
5858
self.symbols = json.load(f)
5959
logger.debug("Loaded cached S57 symbols")
6060
return
@@ -99,7 +99,7 @@ def __init__(self, settingsManager):
9999
except:
100100
continue
101101

102-
with open(DATA_DIR + "s57_symbols.json", "w") as f:
102+
with open(DATA_DIR + "/s57_symbols.json", "w") as f:
103103
json.dump(self.symbols, f)
104104
f.close()
105105
logger.debug("Saved cached S57 symbols")

gweatherrouting/gtk/gribmanagerwindow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ def downloadList(self):
7878
self.gribFilesStore.append(x)
7979
Gdk.threads_leave()
8080
Gdk.threads_enter()
81-
except:
81+
except Exception as e:
8282
Gdk.threads_enter()
83-
logger.error("Failed to download grib file list")
83+
logger.error(f"Failed to download grib file list: {str(e)}")
8484
self.builder.get_object("download-progress").set_text(
8585
"Failed to download grib list"
8686
)

0 commit comments

Comments
 (0)