Open AbhishekSRaut opened 9 months ago
same issue, python 3.9
I have a solution y can try it,
" use .history() instead of .download() " code here:
def yfinance():
import datetime
from dateutil.relativedelta import relativedelta
import yfinance as yf
date = datetime.datetime.now().date()
end_date = date
start_date = date + relativedelta(months= -63)
msft = yf.Ticker("MSFT")
# get historical market data
hist = msft.history(start=start_date, end=end_date, interval="1mo")
hist.to_excel("ms.xlsx", index=None)
yfinance()
the detail ref url here https://pypi.org/project/yfinance/
god bless y
I am using python 3.11.5 (windows 11) When i am trying to running my script without console, which is downloading data through yfinance, it is not working. when i am running with console, then only script is proper functioning. following is error:
any solution?