-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to get ticker '<Tickername>' reason: Expecting value: line 1 column 1 (char 0) #2179
Comments
Re-run with |
@rajanpanchal I managed to get it working if you specify start and end times explicitly. Something like this: import yfinance as yf
import datetime as dt
end=dt.datetime.now()
if end.month<=6:
start = end.replace(year=end.year-1, month=12+(end.month-6))
else:
start = end.replace(month=end.month-6)
data = yf.download("AXON", interval='1wk', end=end, start=start) The error seems to be with the yahoo finance api itself as I can't get any stock data for anything with |
I face the same issue and by specifying the start and end dates doesn't help unfortunately. My ticker list includes all listed companies in Japan and this line of code used to work back in October 2nd. |
Can you specify all the tickers in japan? Or at least where you define them Can you also do what value raider said and run it with |
@R5dan Let me share the entire code and my ticker list.
|
#2052: The error is you can't have a |
Hi @R5dan
|
@Utetsu yfinance sends the request to here for TSMC. In my testing, I found that when expanding the day time from 01 to 10 it returns data for most of the days - excluding 03. October 3 is a market holiday so yahoo can't get any data for it and so returns nothing. Leading to your error. The bug I was talking about before seems to be resolved now though. |
All the others seem to return data |
This is a weird one.. I was getting it a lot and reverted to finance 0.25.0 and get it less frequently. I can rerun the exact same batch and will get it at different times. I almost wonder if it's yahoo throttling of some sort.. I download in batches of 11 and it will get the error message for a while and I will restart and it will get to an entirely different set of stickers and the error comes back. I specified the start date and end date explicitly as mentioned above and that seemed to make it a bit better. 11 Failed downloads: Are other people still getting this error message? |
I may be wrong; this is what I found - workaround on the last paragraph: I ran this with What I think is happening is:
The workaround that is working for me is to not pass a |
I've just now fixed this in
Another change in |
Describe bug
when downloading tickers I am seeing "Failed to get ticker 'AXON' reason: Expecting value: line 1 column 1 (char 0)" . Only some tickers are successful rest all failing with same error. I have checked these tickers exists at finance.yahoo.com
Simple code that reproduces your problem
` data = yf.download(tickers, period='6mo', interval='1wk', auto_adjust=True, progress=True)```
Debug log
Bad data proof
yfinance
version0.1.62
Python version
3
Operating system
windows 11
The text was updated successfully, but these errors were encountered: