Skip to content
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

fix exception for no data with YahooDailyReader #994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

fix exception for no data with `YahooDailyReader`

74f9a90
Select commit
Loading
Failed to load commit list.
Open

fix exception for no data with YahooDailyReader #994

fix exception for no data with `YahooDailyReader`
74f9a90
Select commit
Loading
Failed to load commit list.
Azure Pipelines / pydata.pandas-datareader failed Aug 8, 2024 in 3m 50s

Build #20240808.1 had test failures

Details

Tests

  • Failed: 134 (23.63%)
  • Passed: 214 (37.74%)
  • Other: 219 (38.62%)
  • Total: 567
Code coverage

  • 556 of 827 branches covered (67.23%)
  • 2007 of 2871 lines covered (69.91%)

Annotations

Check failure on line 15 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

Build log #L15

PowerShell exited with code '1'.

Check failure on line 35 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

Build log #L35

Bash exited with code '4'.

Check failure on line 35 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

Build log #L35

Bash exited with code '4'.

Check failure on line 15 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

Build log #L15

PowerShell exited with code '1'.

Check failure on line 1 in test_fetch_single_ticker_series[CPIUS]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

test_fetch_single_ticker_series[CPIUS]

KeyError: 'results'
Raw output
self = <pandas_datareader.tests.test_econdb.TestEcondb object at 0x7ff446cadc10>
ticker = 'CPIUS'

    @pytest.mark.parametrize("ticker", tickers)
    def test_fetch_single_ticker_series(self, ticker):
>       df = web.DataReader(
            f"ticker={ticker}",
            "econdb",
            start=pd.Timestamp("2010-01-01"),
            end=pd.Timestamp("2013-01-27"),
        )

pandas_datareader/tests/test_econdb.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pandas/util/_decorators.py:211: in wrapper
    return func(*args, **kwargs)
pandas_datareader/data.py:659: in DataReader
    return EcondbReader(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas_datareader.econdb.EcondbReader object at 0x7ff446c3edc0>

    def read(self):
        """read one data from specified URL"""
>       results = self.session.get(self.url).json()["results"]
E       KeyError: 'results'

pandas_datareader/econdb.py:80: KeyError

Check failure on line 1 in test_bankofcanada_usd_inverted

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

test_bankofcanada_usd_inverted

TypeError: zip() takes no keyword arguments
Raw output
self = <pandas_datareader.tests.test_bankofcanada.TestBankOfCanada object at 0x7f296bbdfee0>

    def test_bankofcanada_usd_inverted(self):
>       self.check_bankofcanada_inverted("USD")

pandas_datareader/tests/test_bankofcanada.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas_datareader.tests.test_bankofcanada.TestBankOfCanada object at 0x7f296bbdfee0>
code = 'USD'

    def check_bankofcanada_inverted(self, code):
        symbol = self.get_symbol(code)
        symbol_inverted = self.get_symbol(code, inverted=True)
    
        df = web.DataReader(
            symbol, "bankofcanada", date.today() - timedelta(days=30), date.today()
        )
        df_i = web.DataReader(
            symbol_inverted,
            "bankofcanada",
            date.today() - timedelta(days=30),
            date.today(),
        )
    
>       pairs = zip(
            (1 / df)[symbol].tolist(), df_i[symbol_inverted].tolist(), strict=True
        )
E       TypeError: zip() takes no keyword arguments

pandas_datareader/tests/test_bankofcanada.py:45: TypeError

Check failure on line 1 in test_fetch_single_ticker_series[CPIES]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

test_fetch_single_ticker_series[CPIES]

KeyError: 'results'
Raw output
self = <pandas_datareader.tests.test_econdb.TestEcondb object at 0x7ff446d9eeb0>
ticker = 'CPIES'

    @pytest.mark.parametrize("ticker", tickers)
    def test_fetch_single_ticker_series(self, ticker):
>       df = web.DataReader(
            f"ticker={ticker}",
            "econdb",
            start=pd.Timestamp("2010-01-01"),
            end=pd.Timestamp("2013-01-27"),
        )

pandas_datareader/tests/test_econdb.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pandas/util/_decorators.py:211: in wrapper
    return func(*args, **kwargs)
pandas_datareader/data.py:659: in DataReader
    return EcondbReader(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas_datareader.econdb.EcondbReader object at 0x7ff446b6f880>

    def read(self):
        """read one data from specified URL"""
>       results = self.session.get(self.url).json()["results"]
E       KeyError: 'results'

pandas_datareader/econdb.py:80: KeyError

Check failure on line 1 in test_fetch_single_ticker_series[CPIUK]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / pydata.pandas-datareader

test_fetch_single_ticker_series[CPIUK]

KeyError: 'results'
Raw output
self = <pandas_datareader.tests.test_econdb.TestEcondb object at 0x7ff446d9eb50>
ticker = 'CPIUK'

    @pytest.mark.parametrize("ticker", tickers)
    def test_fetch_single_ticker_series(self, ticker):
>       df = web.DataReader(
            f"ticker={ticker}",
            "econdb",
            start=pd.Timestamp("2010-01-01"),
            end=pd.Timestamp("2013-01-27"),
        )

pandas_datareader/tests/test_econdb.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pandas/util/_decorators.py:211: in wrapper
    return func(*args, **kwargs)
pandas_datareader/data.py:659: in DataReader
    return EcondbReader(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pandas_datareader.econdb.EcondbReader object at 0x7ff4469da1c0>

    def read(self):
        """read one data from specified URL"""
>       results = self.session.get(self.url).json()["results"]
E       KeyError: 'results'

pandas_datareader/econdb.py:80: KeyError