Skip to content

Commit

Permalink
File for pickle dump must be opened in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-zhilov committed Oct 2, 2023
1 parent 539abb6 commit cbabcfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recon_lw/EventsSaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def save_events(self, batch):
scope = e["scope"] if "scope" in e else "default"
#temp test
if scope not in self._files:
self._files[scope] = open(str(self._path) + "/" + str(scope) + "_" +str(self._event_sequence["stamp"]), 'w')
self._files[scope] = open(os.path.join(self._path, f"{scope}_{self._event_sequence['stamp']}"), 'wb')

pickle.dump(e, self._files[scope])
return
Expand Down

0 comments on commit cbabcfa

Please sign in to comment.