Skip to content

Commit 5ee5c4f

Browse files
committed
CI: explicitly import dbm.sqlite3 to make pyinstaller work
1 parent c04170e commit 5ee5c4f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

mapillary_tools/history.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
import typing as T
1111
from pathlib import Path
1212

13+
# dbm modules are dynamically imported, so here we explicitly import dbm.sqlite3 to make sure pyinstaller include it
14+
# Otherwise you will see: ImportError: no dbm clone found; tried ['dbm.sqlite3', 'dbm.gnu', 'dbm.ndbm', 'dbm.dumb']
15+
try:
16+
import dbm.sqlite3
17+
except ImportError:
18+
pass
19+
20+
1321
from . import constants, types
1422
from .serializer.description import DescriptionJSONSerializer
1523

0 commit comments

Comments
 (0)