diff --git a/ultrack/core/database.py b/ultrack/core/database.py index 3b1232d..1a84eb5 100644 --- a/ultrack/core/database.py +++ b/ultrack/core/database.py @@ -1,5 +1,6 @@ import enum import logging +import pickle from pathlib import Path from typing import Any, List, Union @@ -39,7 +40,11 @@ def bind_processor(self, dialect): def _process(value): if isinstance(value, (bytes, memoryview)): return value - return processor(value) + try: + return processor(value) + except pickle.UnpicklingError: + # for some reason, when converting database it has a few extra bytes + return processor(bytes.fromhex(value[3:].decode("utf-8"))) return _process