Closed bodgerer closed 5 years ago
Maybe a duplicate of #23088 - is this in a clean environment?
And to add to that, can you clarify how you did your install of pandas
(i.e. tools / commands used)?
Hi both,
Many thanks for taking a look and apologies for not spotting #23088, although the error messages are somewhat different.
It is a clean environment and it's an automated installation, so I can provide all the commands/steps used. However, it's a bit long.
The short method below gives a similar result. I'm on a centos7 box. Am I doing it wrong?
mkdir build src
prefix=`pwd`/build
cd src
# Add a copy of python3 and the compiler used to build it to the environment
module purge
module load python/3.6.0 gnu/6.3.0
export PATH=${prefix}/bin:${PATH}
export CPATH=${prefix}/include:${CPATH}
export LIBRARY_PATH=${prefix}/lib:${LIBRARY_PATH}
export LD_LIBRARY_PATH=${prefix}/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=${prefix}/lib/python3.6/site-packages
pip install --prefix=$prefix pytest numpy scipy
tar xvf pandas-0.23.4.tar.gz
cd pandas-0.23.4
python setup.py build
python setup.py install --prefix="${prefix}"
cd ..
After doing this, attempting to run tests results in:
$ python -c 'import pandas; pandas.test()'
running: pytest --skip-slow --skip-network /somewhere/py_pip2/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.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /somewhere/py_pip2, inifile:
collected 26393 items / 3 errors / 5 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 ===============================
/somewhere/py_pip2/build/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:294
/somewhere/py_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/_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_pip2/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/indexes/timedeltas/test_ops.py:337
/somewhere/py_pip2/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/indexes/timedeltas/test_ops.py:337: DeprecationWarning: invalid escape sequence \*
msg = '<2 \* BusinessDays> is a non-fixed frequency'
/somewhere/py_pip2/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/internals/test_internals.py:1292
/somewhere/py_pip2/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/tests/internals/test_internals.py:1292: DeprecationWarning: invalid escape sequence \[
msg = "Wrong number of dimensions. values.ndim != ndim \[1 != 2\]"
/somewhere/py_pip2/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_pip2/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 !!!!!!!!!!!!!!!!!!!!
=============== 5 skipped, 9 warnings, 3 error in 41.29 seconds ================
$ python -c 'import pandas; pandas.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.10.1
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
Can you try building master and seeing what fails? The warnings like /somewhere/py_pip2/build/lib/python3.6/site-packages/_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.
have already been fixed.
Can you run pandas.util.testing.get_locales()
and post the output?
For the above build, pandas.util.testing.get_locales()
returns:
$ python -c 'import pandas; pandas.util.testing.get_locales()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/somewhere/py_pip2/build/lib/python3.6/site-packages/pandas-0.23.4-py3.6-linux-x86_64.egg/pandas/util/testing.py", line 456, in get_locales
x, encoding=pd.options.display.encoding))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte
Interestingly, I get a similar error from a fresh python3.7 miniconda environment after doing a conda install pandas
.
I've built and run master in a fresh directory using the same method as above, replacing the pandas build with:
pip install --prefix=$prefix cython hypothesis
git clone https://github.com/pandas-dev/pandas.git
cd pandas
python setup.py build
python setup.py install --prefix="${prefix}"
cd ..
I get:
$ python -c 'import pandas; pandas.util.testing.get_locales()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/somewhere/py_pandas_master/build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/util/testing.py", line 467, in get_locales
x, encoding=pd.options.display.encoding))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4: invalid continuation byte
And:
$ python -c 'import pandas; pandas.test()'
running: pytest --skip-slow --skip-network /somewhere/py_pandas_master/build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas
============================= test session starts ==============================
platform linux -- Python 3.6.0, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
hypothesis profile 'ci' -> timeout=-1, deadline=500, suppress_health_check=[HealthCheck.too_slow], database=DirectoryBasedExampleDatabase('/somewhere/py_pandas_master/src/.hypothesis/examples')
rootdir: /somewhere/py_pandas_master, inifile:
plugins: hypothesis-3.82.1
collected 38202 items / 3 errors / 6 skipped
==================================== ERRORS ====================================
ERROR collecting build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py:91: in <module>
class TestDatetime64(object):
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/indexes/datetimes/test_misc.py:247: in TestDatetime64
None] if tm.get_locales() is None else [None] + tm.get_locales())
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/util/testing.py:467: 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.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py:29: in <module>
class TestTimestampProperties(object):
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/scalar/timestamp/test_timestamp.py:105: in TestTimestampProperties
None] if tm.get_locales() is None else [None] + tm.get_locales())
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/util/testing.py:467: 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.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py:27: in <module>
class TestSeriesDatetimeValues():
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/tests/series/test_datetime_values.py:322: in TestSeriesDatetimeValues
None] if tm.get_locales() is None else [None] + tm.get_locales())
../build/lib/python3.6/site-packages/pandas-0.24.0.dev0+992.g20bdb3e-py3.6-linux-x86_64.egg/pandas/util/testing.py:467: 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 ===============================
/somewhere/py_pandas_master/build/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:272
/somewhere/py_pandas_master/build/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:272: PytestWarning: Module already imported so cannot be rewritten: hypothesis
self.config,
-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
=============== 6 skipped, 1 warnings, 3 error in 30.89 seconds ================
That's the full traceback for the unicode error? I was hoping for more.
What's the output of locale -a
?
Should I read anything into the fact that py_pip2/
is in your path? Is that an indication that a pip attached to python 2 was used to install pandas?
The recommended way to invoke pip is python -m pip install pandas hypothesis
.
I'm afraid that's the full output. locale -a
output below.
Don't read anything into py_pip2, it's just my terrible naming of a scratch directory. I've repeated the test by doing a fresh install and using python -m pip install --prefix=$prefix pytest numpy scipy cython hypothesis
with the same result.
Setting export LANG=en_GB
instead of my machine/account's default of en_GB.utf8
makes the above errors go away and the test suite is able to start running. My build against master reports:
35727 passed, 5143 skipped, 318 xfailed, 6 xpassed, 32 warnings in 678.87 seconds
Whereas my build against 0.23.4 reports:
4 failed, 25058 passed, 4183 skipped, 78 xfailed, 26 xpassed, 163 warnings in 424.04 seconds
(failures are something to do with the months of the year in different languages, don't know if this is interesting?)
$ locale -a
Do you get the same errors on master with your normal locale? There was a change focused on fixing locale testing issues which gets released in 0.24 though I think it was only focused on Py27 (#22213)
I get the same utf-8 unicode decode errors against both 0.23.4 and master. They all go away if I change the LANG
environment variable from the default en_GB.utf8
to en_GB
.
Once LANG
has been tweaked, unit tests are able to completion. 0.23.4 has 4 failures (clearly to do with locales), master has none.
I'm not sure what's going wrong here then. Let us know if you're able to debug it.
On Tue, Nov 13, 2018 at 9:58 AM Mark Dixon notifications@github.com wrote:
I get the same utf-8 unicode decode errors against both 0.23.4 and master. They all go away if I change the LANG environment variable from the default en_GB.utf8 to en_GB.
Once LANG has been tweaked, unit tests are able to completion. 0.23.4 has 4 failures (clearly to do with locales), master has none.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/23638#issuecomment-438318783, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQHIiIMsM0i9p_sKD-72XVTnnGOAfppks5uuuwJgaJpZM4YZ_Df .
@bodgerer any luck?
@bodgerer were you able to find out anything further?
@bodgerer This might not be what you're looking for, but you can just ignore testing certain vendor directories:
$ pytest --ignore=../build/lib
At least now you can perform testing on the code you write yourself.
I installed pandas from Anaconda3-2018.12-Linux-x86_64.sh
import pandas as pd
pd.test()
yielded the following output in a Jupyter notebook:
running: pytest --skip-slow --skip-network /home/omer/anaconda3/lib/python3.7/site-packages/pandas
========================================================== test session starts ===========================================================
platform linux -- Python 3.7.1, pytest-4.0.2, py-1.7.0, pluggy-0.8.0
rootdir: /home/omer, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.1, doctestplus-0.2.0, arraydiff-0.3
collected 26050 items / 3 errors / 2 skipped
================================================================= ERRORS =================================================================
_____________________ ERROR collecting anaconda3/lib/python3.7/site-packages/pandas/tests/groupby/test_whitelist.py ______________________
../../../anaconda3/lib/python3.7/site-packages/pandas/tests/groupby/test_whitelist.py:127: in <module>
"obj, whitelist", zip((df_letters(), df_letters().floats),
E _pytest.warning_types.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.
__________________ ERROR collecting anaconda3/lib/python3.7/site-packages/pandas/tests/indexes/datetimes/test_tools.py ___________________
../../../anaconda3/lib/python3.7/site-packages/pandas/tests/indexes/datetimes/test_tools.py:1494: in <module>
@pytest.fixture(params=[epoch_1960(),
E _pytest.warning_types.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.
______________________ ERROR collecting anaconda3/lib/python3.7/site-packages/pandas/tests/series/test_analytics.py ______________________
../../../anaconda3/lib/python3.7/site-packages/pandas/tests/series/test_analytics.py:1882: in <module>
class TestNLargestNSmallest(object):
../../../anaconda3/lib/python3.7/site-packages/pandas/tests/series/test_analytics.py:1904: in TestNLargestNSmallest
[v for k, v in s_main_dtypes().iteritems()])
E _pytest.warning_types.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.
============================================================ warnings summary ============================================================
/home/omer/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py:754
/home/omer/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py:754: PytestWarning: Module already imported so cannot be rewritten: pytest_remotedata
self._mark_plugins_for_rewrite(hook)
/home/omer/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py:754: PytestWarning: Module already imported so cannot be rewritten: pytest_openfiles
self._mark_plugins_for_rewrite(hook)
/home/omer/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py:754: PytestWarning: Module already imported so cannot be rewritten: pytest_doctestplus
self._mark_plugins_for_rewrite(hook)
/home/omer/anaconda3/lib/python3.7/site-packages/_pytest/config/__init__.py:754: PytestWarning: Module already imported so cannot be rewritten: pytest_arraydiff
self._mark_plugins_for_rewrite(hook)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================ 2 skipped, 4 warnings, 3 error in 13.51 seconds =============================================
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
/home/omer/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3275: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
The output of pd.show_versions() is as follows:
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.16.0-0.bpo.2-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: 4.0.2
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
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.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
same issue, did you solved it?
Those collection errors are fixed on master. You can wait until 0.24 is released (release candidate this week) or downgrade your pytest.
Is it correct behavior ?
Tried py2 (failed tests) and py3 (tests not started) On both installed:
pandas==0.24.0rc1
fixed pytest #4545: Calling fixtures directly is now always an error instead of a warning.
https://github.com/pytest-dev/pytest/issues/4545
pytest== 4.1.1
hypothesis>=3.58 # requested pandas.test() call
Python 2.7.5 pandas.test() finished with 2 failures
============ 2 failed, 43723 passed, 5003 skipped, 752 xfailed, 16 xpassed, 9 warnings in 933.01 seconds ============
FAILURES:
1) TestConfig.test_deprecate_option
self = <pandas.tests.test_config.TestConfig object at 0x7f3eed216190>
def test_deprecate_option(self):
...
E assert 2 == 1
E + where 2 = len([<warnings.WarningMessage object at 0x7f3eed2163d0>, <warnings.WarningMessage object at 0x7f3eed216450>])
venv/lib/python2.7/site-packages/pandas/tests/test_config.py:255: AssertionError
2) test_bad_quote_char[python-kwargs2-"quotechar" must be string, not int]
test_bad_quote_char[python-kwargs2-"quotechar" must be string, not int]
with pytest.raises(TypeError, match=msg):
> parser.read_csv(StringIO(data), **kwargs)
E AssertionError: Pattern '"quotechar" must be string, not int' not found in '"quotechar" must be an 1-character string'
venv/lib/python2.7/site-packages/pandas/tests/io/parser/test_quoting.py:30: AssertionError
Python 3.6.6 pandas.test() halted interpreter
====================================================== ERRORS =======================================================
___________ ERROR collecting venv/lib/python3.6/site-packages/pandas/tests/indexes/datetimes/test_misc.py ___________
venv/lib/python3.6/site-packages/pandas/tests/indexes/datetimes/test_misc.py:91: in <module>
class TestDatetime64(object):
venv/lib/python3.6/site-packages/pandas/tests/indexes/datetimes/test_misc.py:246: in TestDatetime64
None] if tm.get_locales() is None else [None] + tm.get_locales())
venv/lib/python3.6/site-packages/pandas/util/testing.py:516: 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 venv/lib/python3.6/site-packages/pandas/tests/scalar/timestamp/test_timestamp.py _________
venv/lib/python3.6/site-packages/pandas/tests/scalar/timestamp/test_timestamp.py:28: in <module>
class TestTimestampProperties(object):
venv/lib/python3.6/site-packages/pandas/tests/scalar/timestamp/test_timestamp.py:104: in TestTimestampProperties
None] if tm.get_locales() is None else [None] + tm.get_locales())
venv/lib/python3.6/site-packages/pandas/util/testing.py:516: 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 venv/lib/python3.6/site-packages/pandas/tests/series/test_datetime_values.py ___________
venv/lib/python3.6/site-packages/pandas/tests/series/test_datetime_values.py:27: in <module>
class TestSeriesDatetimeValues():
venv/lib/python3.6/site-packages/pandas/tests/series/test_datetime_values.py:322: in TestSeriesDatetimeValues
None] if tm.get_locales() is None else [None] + tm.get_locales())
venv/lib/python3.6/site-packages/pandas/util/testing.py:516: 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 venv/lib/python3.6/site-packages/pandas/tests/util/test_locale.py _________________
venv/lib/python3.6/site-packages/pandas/tests/util/test_locale.py:13: in <module>
_all_locales = tm.get_locales() or []
venv/lib/python3.6/site-packages/pandas/util/testing.py:516: 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 ==================================================
venv/lib/python3.6/site-packages/_pytest/config/__init__.py:730
/home/koxt/dev/py/pd3/venv/lib/python3.6/site-packages/_pytest/config/__init__.py:730: PytestWarning: Module already imported so cannot be rewritten: hypothesis
self._mark_plugins_for_rewrite(hook)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================== 7 skipped, 1 warnings, 4 error in 36.71 seconds ==================================
We've seen that locale issue elsewhere. Not sure if it's fixed on master.
Can you debug the other failures? What's the other warning that's being raised?
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
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
Output of
pd.show_versions()