'Json error in fix_yahoo_finance package, how do i resolve it?

I am starting with python programming. I saw a youtube tutorial and typed it as it was but there were some errors.

import fix_yahoo_finance as yf
import pandas as pd

ticker = 'ADS.DE'
data = yf.download(ticker, start='2019-01-01', end='2022-01-01')
df = pd.DataFrame(data)
print(df)

The error was

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

and

During handling of the above exception, another exception occurred: raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] Forbidden: 0

how do I resolve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source