question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pandas 0.23.4 fails unit tests

See original GitHub issue

Problem description

Cannot seem to complete unit tests on a source install of pandas 0.23.4. I’m sure I’m doing something dumb, but cannot see what. Any ideas, please?

Code Sample, a copy-pastable example if possible

$ python
Python 3.6.0 (default, Feb 22 2017, 16:36:12) 
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> pandas.test()
running: pytest --skip-slow --skip-network /somewhere/py_new/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas
============================= test session starts ==============================
platform linux -- Python 3.6.0, pytest-3.9.3, py-1.7.0, pluggy-0.8.0
rootdir: /somewhere/py_new, inifile:
plugins: cov-2.6.0
collected 26659 items / 3 errors / 2 skipped

==================================== ERRORS ====================================
 ERROR collecting build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py 
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py:90: in <module>
    class TestDatetime64(object):
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py:246: in TestDatetime64
    None] if tm.get_locales() is None else [None] + tm.get_locales())
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/util/testing.py:456: in get_locales
    x, encoding=pd.options.display.encoding))
E   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte
 ERROR collecting build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py 
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py:28: in <module>
    class TestTimestampProperties(object):
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py:104: in TestTimestampProperties
    None] if tm.get_locales() is None else [None] + tm.get_locales())
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/util/testing.py:456: in get_locales
    x, encoding=pd.options.display.encoding))
E   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte
 ERROR collecting build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py 
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py:25: in <module>
    class TestSeriesDatetimeValues(TestData):
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py:280: in TestSeriesDatetimeValues
    None] if tm.get_locales() is None else [None] + tm.get_locales())
build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/util/testing.py:456: in get_locales
    x, encoding=pd.options.display.encoding))
E   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte
=============================== warnings summary ===============================
build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "df_letters" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "df_letters" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "epoch_1960" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "epoch_1960" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "epoch_1960" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)
  /somewhere/py_new/build/lib/python3.6/site-packages/pytest-3.9.3-py3.6.egg/_pytest/assertion/rewrite.py:294: RemovedInPytest4Warning: Fixture "epoch_1960" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    six.exec_(co, mod.__dict__)

build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/series/test_analytics.py:1882
  /somewhere/py_new/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/series/test_analytics.py:1882: RemovedInPytest4Warning: Fixture "s_main_dtypes" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
    class TestNLargestNSmallest(object):

-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
=============== 2 skipped, 7 warnings, 3 error in 49.24 seconds ================

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.0.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0-693.11.6.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.utf8 LOCALE: en_GB.UTF-8

pandas: 0.23.4 pytest: 3.9.3 pip: 18.1 setuptools: 40.5.0 Cython: 0.29 numpy: 1.15.3 scipy: 1.1.0 pyarrow: None xarray: None IPython: 7.1.1 sphinx: 1.8.1 patsy: None dateutil: 2.7.5 pytz: 2018.7 blosc: None bottleneck: 1.2.1 tables: 3.4.4 numexpr: 2.6.8 feather: None matplotlib: 3.0.1 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.10 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
TomAugspurgercommented, Jan 8, 2019

Those collection errors are fixed on master. You can wait until 0.24 is released (release candidate this week) or downgrade your pytest.

0reactions
WillAydcommented, Apr 24, 2019

Original issue here is resolved. Other issues are orthogonal or even no longer supported (ex: Py2 issues) so closing as is. If anyone has anything else please open as a new issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes — pandas 0.23.4 documentation - PyData |
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes and bug fixes. See the full whatsnew...
Read more >
IO Tools (Text, CSV, HDF5, …) — pandas 0.23.4 documentation
If #2 fails, date_parser is called once for every row with one or more string arguments from the columns indicated with parse_dates (e.g., ......
Read more >
What's New — pandas 0.23.4 documentation - PyData |
Re-allowed duplicate level names of a MultiIndex . Accessing a level that has a duplicate name by name still raises an error (GH19029)....
Read more >
Frequently Asked Questions (FAQ) — pandas 0.23.4 ...
Using the Python in operator on a Series tests for membership in the index, not membership among the values. ... For DataFrames ,...
Read more >
API Reference — pandas 0.23.4 documentation
API Reference¶. This page gives an overview of all public pandas objects, functions and methods. All classes and functions exposed in pandas.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found