Haven't kept up to date, but my bean-price stopped working (for getting my
ETF prices) roughly in May, and now that I'm looking into it...

Firstly it seems curl_cffi is now needed if using the yahoo source, so I
got that installed, but I keep getting variants of this error:-

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/beanprice/price.py", line 511, in
fetch_cached_price
    timestamp_created, result_naive = _CACHE[key]
                                      ~~~~~~^^^^^
  File "/usr/lib/python3.13/site-packages/diskcache/core.py", line 1234, in
__getitem__
    raise KeyError(key)
KeyError: '1b8bfc85ef72b8165072e7e2a6ea5175'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/bean-price", line 33, in <module>
    sys.exit(load_entry_point('beanprice==2.1.0', 'console_scripts',
'bean-price')())

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/beanprice/price.py", line 975, 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 456, 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 "/usr/lib/python3.13/site-packages/beanprice/price.py", line 604, in
fetch_price
    srcprice = fetch_cached_price(source, psource.symbol, dprice.date)
  File "/usr/lib/python3.13/site-packages/beanprice/price.py", line 529, in
fetch_cached_price
    source.get_latest_price(symbol)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/site-packages/beanprice/sources/yahoo.py", line
163, in get_latest_price
    result = parse_response(response)
  File "/usr/lib/python3.13/site-packages/beanprice/sources/yahoo.py", line
40, in parse_response
    json = response.json(parse_float=Decimal)
  File "/usr/lib/python3.13/site-packages/curl_cffi/requests/models.py",
line 226, in json
    return loads(self.content, **kw)
TypeError: orjson.loads() takes no keyword arguments

Exploring other data sources led me to alphavantage which works but doesn't
give historical prices. Is there anything else I can do to obtain pricing
for equities/ETFs? Is alphavantage the best currently (but with no history)?

-- 
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/CAGQ70esGp2oWAOocv%3DwRFCXVoEO-Vf9_GBsLFUO%2BUQD0y%3DNzHQ%40mail.gmail.com.

Reply via email to