Skip to content

Commit ff6d195

Browse files
committed
zopen: add explicit encoding to read_json; explicit mode
1 parent 0fddbc2 commit ff6d195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/maggma/stores/file_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def query( # type: ignore
442442
# TODO - could add more logic for detecting different file types
443443
# and more nuanced exception handling
444444
try:
445-
with zopen(d["path"], "rt", encoding=self.encoding) as f:
445+
with zopen(d["path"], mode="rt", encoding=self.encoding) as f:
446446
data = f.read()
447447
except Exception as e:
448448
data = f"Unable to read: {e}"

0 commit comments

Comments
 (0)