You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beside the issue #1938 that I just reported, I found another issue that seldom occured in the past.
the get_earnings_dates() method return data apparently slower than before and because of that reason, the get_earnings_dates() method always raise exception for being not able to retrieve data successfully, but when I triger this method in the jupyter notebook, it did successfully retrieve the data after waiting for a long time.
Simple code that reproduces your problem
here is the exception raised by get_earnings_dates() method which catched by my code.
this attachment is the sourse code
this is the debug window showiing when the code running the method 'controled_get_earnings_datas()':
Sorry the program notes writen in Chinese, in order to make it read easier I translate some key notes in English, here is the translation: source code**
access the earnings data in a controled speed in order not to make the server overload
Describe bug
Beside the issue #1938 that I just reported, I found another issue that seldom occured in the past.
the get_earnings_dates() method return data apparently slower than before and because of that reason, the get_earnings_dates() method always raise exception for being not able to retrieve data successfully, but when I triger this method in the jupyter notebook, it did successfully retrieve the data after waiting for a long time.
Simple code that reproduces your problem
here is the exception raised by get_earnings_dates() method which catched by my code.
this attachment is the sourse code
![sourse code](https://private-user-images.githubusercontent.com/129495891/331668887-75dfc4ac-a024-4f73-a14e-eacc55daf248.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNDk1NjgsIm5iZiI6MTcyMTE0OTI2OCwicGF0aCI6Ii8xMjk0OTU4OTEvMzMxNjY4ODg3LTc1ZGZjNGFjLWEwMjQtNGY3My1hMTRlLWVhY2M1NWRhZjI0OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxNlQxNzAxMDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MDE5NzZhZmFmZTFjNTRmMzU1MWRkYTA2M2Q2YjczMjRlMmMyNWJjZTlkNDY1MmYzOTIyYWQ2YzBkY2IxZDk0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.LPGDgk3DkZVE4EXSPxJpfLf2X6Cp8Gn9ynSlVByEnV0)
this is the debug window showiing when the code running the method 'controled_get_earnings_datas()':
![time out error](https://private-user-images.githubusercontent.com/129495891/331669152-285b626a-1377-4a5d-9f54-96ebbcd41608.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNDk1NjgsIm5iZiI6MTcyMTE0OTI2OCwicGF0aCI6Ii8xMjk0OTU4OTEvMzMxNjY5MTUyLTI4NWI2MjZhLTEzNzctNGE1ZC05ZjU0LTk2ZWJiY2Q0MTYwOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxNlQxNzAxMDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYWI0ZmNjMmUxMGVmZTk5NWI4YWI5YjYyODA1MGJiYTYyNTg1NGIyZjIxY2VhNTZhMWU0ODYxY2E3OWM2MGQ0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.XIlD3nxe8Y4w44CkExh1CpSfutev-SE77ooXO17M9UU)
Sorry the program notes writen in Chinese, in order to make it read easier I translate some key notes in English, here is the translation:
source code**
access the earnings data in a controled speed in order not to make the server overload
def controled_get_earnings_datas(stock,max_num):
global G_EARNINGS_DATA_ACCESS_NUM
try:
earnings = stock.get_earnings_dates(limit=max_num)
G_EARNINGS_DATA_ACCESS_NUM += 1
end code****************
Debug log
--EMR--yfinance 函数get_earnings_dates()抛异常: HTTPSConnectionPool(host='finance.yahoo.com', port=443): Read timed out.
Bad data proof
No response
yfinance
version0.2.38
Python version
No response
Operating system
No response
The text was updated successfully, but these errors were encountered: