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

data type "datetime" not understood #17784

Closed
rekado opened this issue Oct 4, 2017 · 8 comments
Closed

data type "datetime" not understood #17784

rekado opened this issue Oct 4, 2017 · 8 comments
Labels
Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions

Comments

@rekado
Copy link

rekado commented Oct 4, 2017

When building pandas 0.19.2 or 0.20.3 I get many similar test failures.

Here is one from the attempt to build 0.19.2:

======================================================================
ERROR: test_timedelta64_equal_timedelta_supported_ops (pandas.tests.series.test_operators.TestSeriesOperators)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-python-pandas-0.19.2.drv-0/pandas-0.19.2/pandas/tests/series/test_operators.py", line 570, in test_timedelta64_equal_timedelta_supported_ops
    lhs = op(ser, nptd)
  File "/tmp/guix-build-python-pandas-0.19.2.drv-0/pandas-0.19.2/pandas/core/ops.py", line 696, in wrapper
    converted = _Op.get_op(left, right, name, na_op)
  File "/tmp/guix-build-python-pandas-0.19.2.drv-0/pandas-0.19.2/pandas/core/ops.py", line 330, in get_op
    return _TimeOp(left, right, name, na_op)
  File "/tmp/guix-build-python-pandas-0.19.2.drv-0/pandas-0.19.2/pandas/core/ops.py", line 343, in __init__
    lvalues = self._convert_to_array(left, name=name)
  File "/tmp/guix-build-python-pandas-0.19.2.drv-0/pandas-0.19.2/pandas/core/ops.py", line 454, in _convert_to_array
    if (inferred_type in ('datetime64', 'datetime', 'date', 'time') or
TypeError: data type "datetime" not understood

I get these errors with python-dateutil 2.6.0 as well as 2.6.1. Could you please confirm that the tests pass when building with python-dateutil 2.6.x?

I'm building with Python 3.5.3.

@chris-b1
Copy link
Contributor

chris-b1 commented Oct 4, 2017

Can you please try on master - we do test with 2.6.1, what you are seeing is most likely fixed by
#16880

@rekado
Copy link
Author

rekado commented Oct 4, 2017

Hmm, I applied the patches from #16880, and while that avoids the TypeError, I now get AssertionErrors like this one:

======================================================================
FAIL: pandas.tests.plotting.test_datetimelike.TestTSPlot.test_finder_daily
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/gnu/store/341qa9zyviccnwvkw3yb67yligjvizb9-python-nose-1.3.7/lib/python3.5/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/guix-build-python-pandas-0.20.3.drv-0/pandas-0.20.3/pandas/tests/plotting/test_datetimelike.py", line 409, in test_finder_daily
    assert xp == rs
AssertionError

I'm just trying to upgrade the pandas package we provide with GNU Guix, so I'd rather not move to master.

[This is just one of 26 failures (and many more errors) that I'm getting since upgrading to numpy 1.13.x, so maybe this is rather a problem with building with this version of numpy.]

@chris-b1
Copy link
Contributor

chris-b1 commented Oct 4, 2017

0.21.0 will be released soon, so may make sense to test master, it also includes some numpy 1.13 fixes, #16654 is one, may be some other fixups

@jreback
Copy link
Contributor

jreback commented Oct 4, 2017

pandas is not generally forwards compatible for dependencies. numpy was in the 1.12 IIRC and dateutil was 2.6.0 or less IIRC. (you could actually go back to some of our release builds and check).

cherry-picking specific commits not generally be advisable. You should simply not ship with a higher version of a supported dependency.

@jreback jreback closed this as completed Oct 4, 2017
@jreback jreback added Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions labels Oct 4, 2017
@jreback jreback added this to the No action milestone Oct 4, 2017
@rekado
Copy link
Author

rekado commented Oct 5, 2017

@chris-b1 with the latest version from master I still get 19 test failures and 2443 errors.

The errors are things like this:

======================================================================                                                       
ERROR: pandas.tests.test_resample.TestResampleAPI.test_getitem                                                               
----------------------------------------------------------------------                                                       
Traceback (most recent call last):                                                                                           
 runTest                                                                                                                     
    self.test(*self.arg)                                                                                                     
    r = self.frame.resample('H')                                                                                             
AttributeError: 'TestResampleAPI' object has no attribute 'frame'                                                            

@jreback Is there an up-to-date list of dependencies and their versions that are known to be supported for a given release?

@jreback
Copy link
Contributor

jreback commented Oct 5, 2017

you would have to look on the CI for the builds that are available at that time; https://travis-ci.org/pandas-dev/pandas/builds

@rekado
Copy link
Author

rekado commented Oct 5, 2017

Okay, thank you.

I have since downgraded numpy to 1.12.x.

@gabegm
Copy link

gabegm commented Nov 28, 2017

Also getting this error on 0.21.0. Downgrading to 0.19.2 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

No branches or pull requests

4 participants