You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<REDACTED>/bin/bean-price", line 8, in <module>
sys.exit(main())
~~~~^^
File "<REDACTED>/lib/python3.13/site-packages/beanprice/price.py", line 961, in main
price_entries = sorted(price_entries, key=lambda e: e.currency)
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "<REDACTED>/lib/python3.13/site-packages/beanprice/price.py", line 595, in fetch_price
srcprice = fetch_cached_price(source, psource.symbol, dprice.date)
File "<REDACTED>/lib/python3.13/site-packages/beanprice/price.py", line 509, in fetch_cached_price
timestamp_created, result_naive = _CACHE[key]
~~~~~~^^^^^
File "/usr/lib/python3.13/shelve.py", line 113, in __getitem__
f = BytesIO(self.dict[key.encode(self.keyencoding)])
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/dbm/sqlite3.py", line 89, in __getitem__
with self._execute(LOOKUP_KEY, (key,)) as cu:
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/dbm/sqlite3.py", line 81, in _execute
raise error(str(exc))
dbm.sqlite3.error: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 139682033261440 and this is thread id 139681986561728.
This is likely caused by sqlite3becoming the default backend for dbm in Python 3.13. dbm is internally used by shelve module (used for _CACHE)
Happens even at default mode of --workers=1; not exactly sure where multiple threads are coming into the picture in this case - I would assume the same thread would be doing everything.
Running with --no-cache fixes the error, but is obviously not desired.
The text was updated successfully, but these errors were encountered:
Running
--update
with the latest master branch (e894c91) on Python 3.13 is giving this error-Full traceback
This is likely caused by
sqlite3
becoming the default backend fordbm
in Python 3.13.dbm
is internally used byshelve
module (used for_CACHE
)Happens even at default mode of
--workers=1
; not exactly sure where multiple threads are coming into the picture in this case - I would assume the same thread would be doing everything.Running with
--no-cache
fixes the error, but is obviously not desired.The text was updated successfully, but these errors were encountered: