I also getting similar errors:

======================

bean-price myfinances.bean --update -vv --update-rate daily -i --no-cache 
--clear-cache
INFO    : Processing at date: 2025-05-08
INFO    : Loading "myfinances.bean"

DEBUG   : -------- Currencies in primary list:
DEBUG   :                           BTC /EUR
DEBUG   : Starting new HTTPS connection (1): fc.yahoo.com:443
DEBUG   : https://fc.yahoo.com:443 "GET / HTTP/1.1" 404 4744
DEBUG   : Starting new HTTPS connection (1): query1.finance.yahoo.com:443
DEBUG   : https://query1.finance.yahoo.com:443 "GET /v1/test/getcrumb 
HTTP/1.1" 429 19
DEBUG   : https://query1.finance.yahoo.com:443 "GET 
/v8/finance/chart/BTC-EUR?period1=1742396400&period2=1742828400&interval=1d&lang=en-US&corsDomain=finance.yahoo.com&.tsrc=finance
 
HTTP/1.1" 429 19
Traceback (most recent call last):
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py",
 
line 974, in json
DEBUG   : Starting new HTTPS connection (1): fc.yahoo.com:443
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\json\__init__.py", 
line 359, in loads
    return cls(**kw).decode(s)
           ^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", 
line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", 
line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Scripts\bean-price.exe\__main__.py",
 
line 7, in <module>
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\price.py",
 
line 967, in main
    price_entries = sorted(price_entries, key=lambda e: e.currency)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py",
 
line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py",
 
line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py",
 
line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\_base.py",
 
line 401, in __get_result
    raise self._exception
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py",
 
line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\price.py",
 
line 596, in fetch_price
    srcprice = fetch_cached_price(source, psource.symbol, dprice.date)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\price.py",
 
line 499, in fetch_cached_price
    else source.get_historical_price(symbol, time)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\sources\yahoo.py",
 
line 184, in get_historical_price
    series, currency = get_price_series(
                       ^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\sources\yahoo.py",
 
line 97, in get_price_series
    result = parse_response(response)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\beanprice\sources\yahoo.py",
 
line 40, in parse_response
    json = response.json(parse_float=Decimal)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"C:\Users\chary\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py",
 
line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 
0)
DEBUG   : https://fc.yahoo.com:443 "GET / HTTP/1.1" 404 4742
DEBUG   : Starting new HTTPS connection (1): query1.finance.yahoo.com:443
DEBUG   : https://query1.finance.yahoo.com:443 "GET /v1/test/getcrumb 
HTTP/1.1" 429 19
DEBUG   : https://query1.finance.yahoo.com:443 "GET 
/v8/finance/chart/BTC-EUR?period1=1742482800&period2=1742914800&interval=1d&lang=en-US&corsDomain=finance.yahoo.com&.tsrc=finance
 
HTTP/1.1" 429 19

On Thursday, May 8, 2025 at 10:42:01 PM UTC+2 fin wrote:

>
> I'm seeing these errors for price fetching recently:
>
> (bc) me@ant(6)~/fin/beancount$ dt=`date -I`
>
> bean-price --no-cache -d ${dt} -e 'USD:yahoo/ABBV'
> Traceback (most recent call last):
> File "/home/me/env/bc/lib/python3.13/site-packages/requests/models.py", 
> line 974, in json
> return complexjson.loads(self.text, **kwargs)
> ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.13/json/__init__.py", line 359, in loads
> return cls(**kw).decode(s)
> ~~~~~~~~~~~~~~~~^^^
> File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
> obj, end = self.raw_decode(s, idx=_w(s, 0).end())
> ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode
> raise JSONDecodeError("Expecting value", s, err.value) from None
> json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/home/me/env/bc/bin/bean-price", line 8, in <module>
> sys.exit(main())
> ~~~~^^
> File "/home/me/env/bc/lib/python3.13/site-packages/beanprice/price.py", 
> line 967, 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 "/home/me/env/bc/lib/python3.13/site-packages/beanprice/price.py", 
> line 596, in fetch_price
> srcprice = fetch_cached_price(source, psource.symbol, dprice.date)
> File "/home/me/env/bc/lib/python3.13/site-packages/beanprice/price.py", 
> line 499, in fetch_cached_price
> else source.get_historical_price(symbol, time)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
> File 
> "/home/me/env/bc/lib/python3.13/site-packages/beanprice/sources/yahoo.py", 
> line 184, in get_historical_price
> series, currency = get_price_series(
> ~~~~~~~~~~~~~~~~^
> ticker, time - timedelta(days=5), time, self.session
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> )
> ^
> File 
> "/home/me/env/bc/lib/python3.13/site-packages/beanprice/sources/yahoo.py", 
> line 97, in get_price_series
> result = parse_response(response)
> File 
> "/home/me/env/bc/lib/python3.13/site-packages/beanprice/sources/yahoo.py", 
> line 40, in parse_response
> json = response.json(parse_float=Decimal)
> File "/home/me/env/bc/lib/python3.13/site-packages/requests/models.py", 
> line 978, in json
> raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
> requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 
> (char 0)
>
>
> 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/dc16c2ef-5d1f-4a2e-a731-c360eacce83cn%40googlegroups.com.

Reply via email to