Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test errors and failures after calling pandas.show_version() #7872

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

Closed
cgohlke opened this issue Jul 26, 2016 · 3 comments
Closed

Test errors and failures after calling pandas.show_version() #7872

cgohlke opened this issue Jul 26, 2016 · 3 comments

Comments

@cgohlke
Copy link
Contributor

cgohlke commented Jul 26, 2016

While testing #7870, I ran into the following numpy test errors and failures after calling pandas.show_version() (using maintenance 1.11.x msvc14+MKL build):

> python -c"import pandas;pandas.show_versions();import numpy;numpy.test()"

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 24.3.1
Cython: 0.24.1
numpy: None
scipy: 0.18.0
statsmodels: 0.6.1
xarray: 0.7.2
IPython: 5.0.0
sphinx: 1.4.5
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.6.1
blosc: 1.4.0
bottleneck: 1.1.0
tables: 3.2.3
numexpr: 2.6.1
matplotlib: 1.5.2
openpyxl: 2.3.5
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: 3.6.1
bs4: 4.5.0
html5lib: 0.999999999
httplib2: 0.9.2
apiclient: 1.5.1
sqlalchemy: 1.0.14
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.8
boto: 2.42.0
pandas_datareader: 0.2.1
Running unit tests for numpy
NumPy version 1.11.1
NumPy relaxed strides checking option: False
NumPy is installed in X:\Python35\lib\site-packages\numpy
Python version 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
nose version 1.3.7

<snip>

======================================================================
ERROR: test_datetime_as_string_timezone (test_datetime.TestDateTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\numpy\testing\decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "X:\Python35\lib\site-packages\numpy\core\tests\test_datetime.py", line 1460, in test_datetime_as_string_timezone
    assert_equal(np.datetime_as_string(a, timezone=tz('US/Central')),
  File "X:\Python35\lib\site-packages\pytz\__init__.py", line 172, in timezone
    zone = _unmunge_zone(zone)
  File "X:\Python35\lib\site-packages\pytz\__init__.py", line 188, in _unmunge_zone
    return zone.replace('_plus_', '+').replace('_minus_', '-')
TypeError: a bytes-like object is required, not 'str'

======================================================================
ERROR: test_deprecations.TestDatetime64Timezone.test_datetime
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "X:\Python35\lib\site-packages\numpy\testing\decorators.py", line 147, in skipper_func
    return f(*args, **kwargs)
  File "X:\Python35\lib\site-packages\numpy\testing\decorators.py", line 217, in knownfailer
    return f(*args, **kwargs)
  File "X:\Python35\lib\site-packages\numpy\core\tests\test_deprecations.py", line 746, in test_datetime
    tz = pytz.timezone('US/Eastern')
  File "X:\Python35\lib\site-packages\pytz\__init__.py", line 172, in timezone
    zone = _unmunge_zone(zone)
  File "X:\Python35\lib\site-packages\pytz\__init__.py", line 188, in _unmunge_zone
    return zone.replace('_plus_', '+').replace('_minus_', '-')
TypeError: a bytes-like object is required, not 'str'

======================================================================
ERROR: test_log2_special (test_umath.TestLog2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\numpy\core\tests\test_umath.py", line 456, in test_log2_special
    assert_(w[1].category is RuntimeWarning)
IndexError: list index out of range

======================================================================
FAIL: test_default (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\numpy\core\tests\test_numeric.py", line 393, in test_default
    under='ignore',
AssertionError: {'invalid': 'ignore', 'divide': 'ignore', 'over': 'ignore', 'under': 'ignore'} != {'invalid': 'warn', 'divide': 'warn', 'under': 'ignore', 'over': 'warn'}
- {'divide': 'ignore', 'invalid': 'ignore', 'over': 'ignore', 'under': 'ignore'}
?             ^^ ---               ^^ ---            ^^ ---

+ {'divide': 'warn', 'invalid': 'warn', 'over': 'warn', 'under': 'ignore'}
?             ^^^                ^^^             ^^^


----------------------------------------------------------------------
Ran 5766 tests in 107.937s

FAILED (KNOWNFAIL=8, SKIP=11, errors=3, failures=1)

import numpy;numpy.test() without import pandas;pandas.show_version() passes all tests. Any idea?

@juliantaylor
Copy link
Contributor

juliantaylor commented Jul 26, 2016

pandas changes the global numpy error state (see np.geterr()) on import so this is not unexpected

@cgohlke
Copy link
Contributor Author

cgohlke commented Jul 26, 2016

Yes, import pandas is enough to cause the last two errors/failures. The datetime TypeErrors seem to be due to reloading pytz.

@cgohlke
Copy link
Contributor Author

cgohlke commented Jul 26, 2016

I reported the pytz error at https://bugs.launchpad.net/pytz/+bug/1606694

@cgohlke cgohlke closed this as completed Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants