Skip to content

Commit

Permalink
Address type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbb committed Jul 16, 2024
1 parent b2d8e07 commit b0740f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesmerize_core/caiman_extensions/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def add_item(self, algo: str, item_name: str, input_movie_path: Union[str, pd.Se

@_verify_and_lock_batch_file
@_index_parser
def update_item(self, index: int, updates: Union[dict, pd.Series]):
def update_item(self, index: Union[int, str, UUID], updates: Union[dict, pd.Series]):
"""
Update the item at the given index or UUID with the data in updates and write to disk.
Expand Down Expand Up @@ -214,7 +214,7 @@ def _save_to_disk_unsafe(self):
with self._batch_lock: # ensure we have the lock to avoid messing up other "safe" operations
self._df.to_pickle(path)
os.remove(bak)
except BaseException as err:
except (Exception, KeyboardInterrupt) as err:
shutil.copyfile(bak, path)
raise IOError(f"Could not save dataframe to disk.") from err
finally:
Expand Down

0 comments on commit b0740f2

Please sign in to comment.