I get pandas_datareader.data.DataReader() error after installing the yfinance package

128 views Asked by At

My anaconda spyder pandas_datareader.data.DataReader() doesn't work after installing yfinance package. Actually yfinance asks me to install the multitasking package, and this seems to be the cause of the error, when a call DataReader().

File "/Users/Daniel/opt/anaconda3/lib/python3.8/site-packages/yfinance/multi.py", line 95, in download_time.sleep(0.01)

I could see some similar claims on the internet, but without a solution.

The simplified code is:

import pandas as pd
import pandas_datareader.data as web
import numpy as np
import yfinance as yf
yf.pdr_override()
import datetime

def dataQuery(pSeriesName, pSeriesSource, pInitDate):
    df = web.DataReader(pSeriesName, pSeriesSource, pInitDate)
    return df 

initDate2 = returnLastYMD(initDate)  

cpiMomSlice = dataQuery('CPIAUCSL', 'fred', initDate2).pct_change()

And spyder console error log:

Console msg

0

There are 0 answers