Skip to content

Commit

Permalink
Fix bug in save_as_pickle
Browse files Browse the repository at this point in the history
read operation should set for file but write set
  • Loading branch information
Mohammad Anvaari committed Nov 11, 2023
1 parent 635c10a commit b0afc51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/pickle_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
logger.setLevel(log_level)

def save_as_pickle(python_object:Union[list,dict,tuple],file_name:str) -> None:
with open(os.path.join(project_path,file_name),'wb') as fp:
with open(os.path.join(project_path,file_name),'rb') as fp:
try:
pickle.dump(python_object,fp)
except Exception as e:
Expand Down

0 comments on commit b0afc51

Please sign in to comment.