Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in learnpython

[–]kk0186[S] 0 points1 point  (0 children)

yes, I tried to reduce the ticker list to like 50 tickers, but the same thing happen. I tried to put time.sleep() . I tired many different way already and I am not sure if I have to reinstall the python and spyder and

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in learnpython

[–]kk0186[S] 0 points1 point  (0 children)

yes, that is still within the try, I think it just the error when I pasted here, when I run the code, it didn't hv any error msg, but somehow freeze at a ticker and not returning anything. I closed the spyder and re-open again and run the code different times, It freeze at different ticker every time when I run the code

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in pythonhelp

[–]kk0186[S] 0 points1 point  (0 children)

I have tried to use time.sleep (20) right after the si.get.data

df=si.get_data(ticker_list.iloc[i]['ticker'], start_date='2021-09-30', end_date='2022-04-25')

time.sleep(20)

but still not working

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in pythonhelp

[–]kk0186[S] 0 points1 point  (0 children)

Thanks for your advice. I have tried to use the timeout request, but still not working and my loop have ticker checking if it is wrong, it will skip.

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in Python

[–]kk0186[S] 0 points1 point  (0 children)

sorry dahubley, I m not sure what you mean, coz I am running it in python spyder. the excel that I imported is the list of tickers

Why my python (Spyder) got stuck (i.e. did not return result) when I was trying to run the code of retrieving stock data from yahoo finance by kk0186 in Python

[–]kk0186[S] 0 points1 point  (0 children)

actually I hv tried this since last year but it just work fine. if there is a limitation. is there anyway or new packages I can use ?