yfinance
yfinance copied to clipboard
May be two problem about using proxy
Describe bug
def _lazy_load_price_history(self):
if self._price_history is None:
self._price_history = PriceHistory(self._data, self.ticker, self._get_ticker_tz(self.proxy, timeout=10),
-
proxy=self.proxy # orignal code here not setting proxy
) return self._price_history
def get_income_stmt(self, proxy=None, as_dict=False, pretty=False, freq="yearly"):
"""
:Parameters:
as_dict: bool
Return table as Python dict
Default is False
pretty: bool
Format row names nicely for readability
Default is False
freq: str
"yearly" or "quarterly"
Default is "yearly"
proxy: str
Optional. Proxy server URL scheme
Default is None
"""
self._fundamentals.proxy = proxy or self.proxy
data = self._fundamentals.financials.get_income_time_series(freq=freq,
+proxy=self._fundamentals.proxy) #orignal code not set proxy here
maybe some other place have same problem, please help
Simple code that reproduces your problem
setting proxy at ticker ,
Debug log from yf.enable_debug_mode()
please check proxy setting in all calling
Bad data proof
No response
yfinance version
0.2.54
Python version
3.11
Operating system
windows
Does PR #2216 solve?
Update: #2391 will handle this