Hello, A defect report has already been opened. The temporary solution is to use --no-cache or something similar.
On Tue, Jan 28, 2025, 16:18 fin <[email protected]> wrote: > When running my bean-price updater in an environment > set up with python 3.13 i get errors that look like, once i > clear the cache it will then work: > > the copy of beanprice i'm using is up to date. > > > ===== > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > Traceback (most recent call last): > File "/home/me/env/bc_3.12/bin/bean-price", line 8, in <module> > sys.exit(main()) > ^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 942, in main > args, jobs, entries, dcontext = process_args() > ^^^^^^^^^^^^^^ > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 864, in process_args > setup_cache(args.cache_filename, args.clear_cache) > File "/home/me/src/github/beancount/beanprice/beanprice/price.py", line > 567, in setup_cache > _CACHE = shelve.open(cache_filename, flag=flag) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 243, in open > return DbfilenameShelf(filename, flag, protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/shelve.py", line 227, in __init__ > Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) > ^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3.12/dbm/__init__.py", line 89, in open > raise error[0]("db type could not be determined") > dbm.error: db type could not be determined > ===== > > > if i clear the cache using my 3.12 environment then i can use > bean-price without errors: > > > (bc_3.12) ~/fin/beancount$ bean-price --clear-cache ledger.bc > (bc_3.12) ~/fin/beancount$ bpa > 2025-01-28 price ABBV 174.80999755859375 USD > 2025-01-28 price ABT 127.38999938964844 USD > 2025-01-28 price AMD 114.16999816894531 USD > 2025-01-28 price GWH 5.489999771118164 USD > 2025-01-28 price INTC 19.799999237060547 USD > 2025-01-28 price PFE 26.75 USD > 2025-01-28 price VST 149.63999938964844 USD > > (bc_3.12) ~/fin/beancount$ which bean-price > /home/me/env/bc_3.12/bin/bean-price > > > fin > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/beancount/3k1o6l-37k.ln1%40anthive.com. > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/beancount/CAMzm8_rd-0QSQdZcwThRUeEfvf7ZdoudBNi9uZMz%3DcA5SqemAg%40mail.gmail.com.
