diff --git a/tests/ticker.py b/tests/ticker.py index 8b8e882d4..45f8eca29 100644 --- a/tests/ticker.py +++ b/tests/ticker.py @@ -86,7 +86,7 @@ def test_getTz(self): # Test: dat = yf.Ticker(tkr, session=self.session) - tz = dat._get_ticker_tz(proxy=None, timeout=None) + tz = dat._get_ticker_tz(proxy=None, timeout=5) self.assertIsNotNone(tz) diff --git a/yfinance/base.py b/yfinance/base.py index f463578aa..2741c1108 100644 --- a/yfinance/base.py +++ b/yfinance/base.py @@ -1650,7 +1650,7 @@ def map_signals_to_ranges(f, f_up, f_down): return df2 - def _get_ticker_tz(self,timeout, proxy=None): + def _get_ticker_tz(self, proxy, timeout): proxy = proxy or self.proxy if self._tz is not None: return self._tz @@ -1675,7 +1675,7 @@ def _get_ticker_tz(self,timeout, proxy=None): return tz @utils.log_indent_decorator - def _fetch_ticker_tz(self, timeout, proxy=None): + def _fetch_ticker_tz(self, proxy, timeout): # Query Yahoo for fast price data just to get returned timezone proxy = proxy or self.proxy logger = utils.get_yf_logger()