diff --git a/optimade/utils.py b/optimade/utils.py index 418c712b8..e315ae485 100644 --- a/optimade/utils.py +++ b/optimade/utils.py @@ -10,7 +10,6 @@ from traceback import print_exc from typing import TYPE_CHECKING, Optional -import bson.json_util from requests.exceptions import SSLError if TYPE_CHECKING: @@ -35,6 +34,8 @@ def insert_from_jsonl(jsonl_path: Path) -> None: """ from collections import defaultdict + import bson.json_util + from optimade.server.routers import ENTRY_COLLECTIONS batch = defaultdict(list)