diff --git a/conservancy_beancount/rtutil.py b/conservancy_beancount/rtutil.py index 509631afd62906249d79672103880201efb197f2..a0173baf79e45cbc64c2e6d41ca0bf7b67f32583 100644 --- a/conservancy_beancount/rtutil.py +++ b/conservancy_beancount/rtutil.py @@ -16,6 +16,7 @@ import functools import mimetypes +import os import re import sqlite3 import urllib.parse as urlparse @@ -73,7 +74,7 @@ class RTLinkCache(_LinkCache): @classmethod def setup(cls, cache_path: Path) -> Optional[sqlite3.Connection]: try: - db = sqlite3.connect(cache_path, isolation_level=None) + db = sqlite3.connect(os.fspath(cache_path), isolation_level=None) cursor = db.cursor() cursor.execute(cls.CREATE_TABLE_SQL) cursor.execute('SELECT url FROM RTLinkCache LIMIT 1')