From a47c9a63cb86bcda226ac0130602747488c0eaf6 Mon Sep 17 00:00:00 2001 From: smithemely <144165634+smithemely@users.noreply.github.com> Date: Sun, 7 Sep 2025 21:12:16 +0300 Subject: [PATCH] fix(cache): switch to filesystem backend for CachedSession to resolve locking issues Fix the "sqlite: bad parameter or other api misuse" error reported on Ubuntu, Windows, and Android by changing the requests_cache backend from sqlite to filesystem. This uses a directory-based cache instead of a single file, eliminating locking problems in concurrent environments. No breaking changes; cache behavior remains compatible. Fixes: #10, #11 --- tstickers/caching.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tstickers/caching.py b/tstickers/caching.py index 078b7d8..46a1378 100644 --- a/tstickers/caching.py +++ b/tstickers/caching.py @@ -11,8 +11,8 @@ # requests_cache cachedSession = CachedSession( - ".cache/tstickers.requests.sqlite", - backend="sqlite", + ".cache/tstickers.requests", + backend="filesystem", expire_after=60 * 60 * 12, allowable_codes=(200,), allowable_methods=("GET", "POST"),