Skip to content

Commit a47c9a6

Browse files
authored
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
1 parent c59d5ae commit a47c9a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tstickers/caching.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
# requests_cache
1313
cachedSession = CachedSession(
14-
".cache/tstickers.requests.sqlite",
15-
backend="sqlite",
14+
".cache/tstickers.requests",
15+
backend="filesystem",
1616
expire_after=60 * 60 * 12,
1717
allowable_codes=(200,),
1818
allowable_methods=("GET", "POST"),

0 commit comments

Comments
 (0)