Skip to content

TST: dateutil testing failures on windows #7337

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
jreback opened this issue Jun 4, 2014 · 24 comments · Fixed by #7362
Closed

TST: dateutil testing failures on windows #7337

jreback opened this issue Jun 4, 2014 · 24 comments · Fixed by #7362
Labels
Testing pandas testing functions or related to the test suite Timezones Timezone data dtype Windows Windows OS
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jun 4, 2014

cc @dbew

(I am just posting 27-64, but failing on most windows versions). prob the same error.

I think has to do with 32-bit ints (which is the default on windows even for 64-bit versions), being treated as 64-bit.

======================================================================
ERROR: test_append_with_timezones_dateutil (pandas.io.tests.test_pytables.TestHDFStore)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\io\tests\test_pytables.py", line 2086, in test_append_with_timezones_dateutil
    store.append('df_tz', df, data_columns=['A'])
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\io\pytables.py", line 911, in append
    **kwargs)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\io\pytables.py", line 1270, in _write_to_group
    s.write(obj=value, append=append, complib=complib, **kwargs)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\io\pytables.py", line 3605, in write
    **kwargs)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\io\pytables.py", line 3298, in create_axes
    % (b.dtype.name, b_items, str(detail))
Exception: cannot find the correct atom type -> [dtype->object,items->Index([u'A'], dtype='object')] list index out of range

======================================================================
ERROR: test_range_tz_dateutil (pandas.tseries.tests.test_daterange.TestDateRange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_daterange.py", line 409, in test_range_tz_dateutil
    dr = date_range(start=start, end=end)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 350, in _generate
    raise ValueError('Start and end cannot both be tz-aware with '
ValueError: Start and end cannot both be tz-aware with different timezones

======================================================================
ERROR: test_append_concat_tz_explicit_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timeseries.py", line 1814, in test_append_concat_tz_explicit_dateutil
    self.assert_(result.index.equals(rng3))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1574, in equals
    self.tz) == tslib.get_timezone(other.tz)
  File "tslib.pyx", line 1013, in pandas.tslib.get_timezone (pandas\tslib.c:16907)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_period_resample_with_local_timezone_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timeseries.py", line 2030, in test_period_resample_with_local_timezone_dateutil
    index = pd.date_range(start, end, freq='H')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 350, in _generate
    raise ValueError('Start and end cannot both be tz-aware with '
ValueError: Start and end cannot both be tz-aware with different timezones

======================================================================
ERROR: test_convert_datetime_list (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 694, in test_convert_datetime_list
    dr2 = DatetimeIndex(list(dr), name='foo')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 214, in __new__
    data = tools.to_datetime(data, errors='raise')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_convert_tz_aware_datetime_datetime (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 587, in test_convert_tz_aware_datetime_datetime
    result = to_datetime(dates_aware)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_date_range_span_dst_transition (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 689, in test_date_range_span_dst_transition
    self.assertTrue((dr.hour == 0).all())
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: Test different DatetimeIndex constructions with timezone
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 756, in test_datetimeindex_tz
    self.assertTrue(idx1.equals(other))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1574, in equals
    self.tz) == tslib.get_timezone(other.tz)
  File "tslib.pyx", line 1013, in pandas.tslib.get_timezone (pandas\tslib.c:16907)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_datetimeindex_tz_nat (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 759, in test_datetimeindex_tz_nat
    idx = to_datetime([Timestamp("2013-1-1", tz=self.tzstr('US/Eastern')), NaT])
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_field_access_localize (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 382, in test_field_access_localize
    self.assertTrue((rng.hour == 0).all())
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_frame_reset_index (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 709, in test_frame_reset_index
    roundtripped = df.reset_index().set_index('index')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\frame.py", line 2270, in set_index
    index = MultiIndex.from_arrays(arrays, names=names)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\index.py", line 2765, in from_arrays
    return Index(arrays[0], name=name)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\index.py", line 178, in __new__
    return DatetimeIndex(subarr, copy=copy, name=name, **kwargs)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 264, in __new__
    subarr = tools.to_datetime(data, box=False)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_getitem_pydatetime_tz (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 731, in test_getitem_pydatetime_tz
    ts = Series(index=index, data=index.hour)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_infer_tz (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 483, in test_infer_tz
    assert(tools._infer_tzinfo(start, end) is self.localize(eastern, _start).tzinfo)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 53, in _infer_tzinfo
    tz = _infer(start, end)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 47, in _infer
    if not (tslib.get_timezone(tz) == tslib.get_timezone(b.tzinfo)):
  File "tslib.pyx", line 1013, in pandas.tslib.get_timezone (pandas\tslib.c:16907)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_localized_at_time_between_time (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 544, in test_localized_at_time_between_time
    result = ts_local.at_time(time(10, 0))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\generic.py", line 2769, in at_time
    indexer = self.index.indexer_at_time(time, asof=asof)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1689, in indexer_at_time
    time_micros = self._get_time_micros()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 733, in _get_time_micros
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_shift_localized (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 655, in test_shift_localized
    result = dr_tz.shift(1, '10T')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 872, in shift
    result = Index.shift(self, n, freq)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\index.py", line 924, in shift
    return Index([idx + offset for idx in self], name=self.name)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\index.py", line 178, in __new__
    return DatetimeIndex(subarr, copy=copy, name=name, **kwargs)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 264, in __new__
    subarr = tools.to_datetime(data, box=False)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_static_tzinfo (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 670, in test_static_tzinfo
    index.hour
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_string_index_alias_tz_aware (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 559, in test_string_index_alias_tz_aware
    result = ts['1/3/2000']
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\series.py", line 479, in __getitem__
    result = self.index.get_value(self, key)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1272, in get_value
    loc = self._get_string_slice(key)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1327, in _get_string_slice
    getattr(self, 'inferred_freq', None))
  File "properties.pyx", line 34, in pandas.lib.cache_readonly.__get__ (pandas\lib.c:36395)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1440, in inferred_freq
    return infer_freq(self)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\frequencies.py", line 653, in infer_freq
    return inferer.get_freq()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\frequencies.py", line 695, in get_freq
    return self._infer_daily_rule()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\frequencies.py", line 783, in _infer_daily_rule
    annual_rule = self._get_annual_rule()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\frequencies.py", line 825, in _get_annual_rule
    pos_check = self.month_position_check()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\frequencies.py", line 741, in month_position_check
    weekdays = self.index.dayofweek
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 449, in _local_timestamps
    return tslib.tz_convert(self.asi8, utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_tz_aware_asfreq (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 665, in test_tz_aware_asfreq
    s.asfreq('T')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\generic.py", line 2754, in asfreq
    normalize=normalize)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\resample.py", line 434, in asfreq
    dti = date_range(obj.index[0], obj.index[-1], freq=freq)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 350, in _generate
    raise ValueError('Start and end cannot both be tz-aware with '
ValueError: Start and end cannot both be tz-aware with different timezones

======================================================================
ERROR: test_tz_convert_unsorted (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 647, in test_tz_convert_unsorted
    result = dr[::-1].hour
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 320, in f
    return self._ops_compat(name,op_accessor)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\core\base.py", line 349, in _ops_compat
    return self._wrap_access_object(getattr(obj,op_accessor))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 47, in f
    values = self._local_timestamps()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 453, in _local_timestamps
    result = tslib.tz_convert(values.take(indexer), utc, self.tz)
  File "tslib.pyx", line 1852, in pandas.tslib.tz_convert (pandas\tslib.c:27975)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_tz_string (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 500, in test_tz_string
    self.assertTrue(result.equals(expected))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 1574, in equals
    self.tz) == tslib.get_timezone(other.tz)
  File "tslib.pyx", line 1013, in pandas.tslib.get_timezone (pandas\tslib.c:16907)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
ERROR: test_tzaware_datetime_to_index (pandas.tseries.tests.test_timezones.TestTimeZoneSupportDateutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tests\test_timezones.py", line 676, in test_tzaware_datetime_to_index
    index = DatetimeIndex(d)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\index.py", line 214, in __new__
    data = tools.to_datetime(data, errors='raise')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 323, in to_datetime
    return _convert_listlike(arg, box, format)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tseries\tools.py", line 310, in _convert_listlike
    values, tz = tslib.datetime_to_datetime64(arg)
  File "tslib.pyx", line 1110, in pandas.tslib.datetime_to_datetime64 (pandas\tslib.c:17961)
  File "tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

======================================================================
FAIL: test_pivot_datetime_tz (pandas.tools.tests.test_pivot.TestPivotTable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\tools\tests\test_pivot.py", line 512, in test_pivot_datetime_tz
    tm.assert_frame_equal(result, expected)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\util\testing.py", line 585, in assert_frame_equal
    check_exact=check_exact)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\util\testing.py", line 526, in assert_series_equal
    assert_attr_equal('dtype', left, right)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\util\testing.py", line 508, in assert_attr_equal
    assert_equal(left_attr,right_attr,"attr is not equal [{0}]" .format(attr))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win-amd64-2.7\pandas\util\testing.py", line 491, in assert_equal
    assert a == b, "%s: %r != %r" % (msg.format(a,b), a, b)
AssertionError: attr is not equal [dtype]: dtype('int32') != dtype('int64')

----------------------------------------------------------------------
Ran 7308 tests in 459.136s

FAILED (SKIP=133, errors=21, failures=1)

C:\Users\Jeff Reback\Documents\GitHub\pandas>  more versions.27-64.log

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

pandas: 0.12.0
nose: 1.3.0
Cython: 0.19.2
numpy: 1.8.0
scipy: 0.13.0
statsmodels: 0.5.0
IPython: 1.1.0
sphinx: None
patsy: 0.2.1
scikits.timeseries: None
dateutil: 2.2
pytz: 2013.8
bottleneck: 0.7.0
tables: 3.0.0
numexpr: 2.2.2
matplotlib: 1.3.1
openpyxl: 1.7.0
xlrd: 0.9.2
xlwt: 0.7.5
xlsxwriter: 0.5.0
lxml: 3.3.5
bs4: 4.3.2
html5lib: 1.0b3
bq: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.3
pymysql: 0.6.1.None
psycopg2: 2.5.2 (dt dec pq3 ext)

C:\Users\Jeff Reback\Documents\GitHub\pandas>more test.27-64.log
@jreback jreback added this to the 0.14.1 milestone Jun 4, 2014
@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

@dbew lmk what debug info I can provide

@dbew
Copy link
Contributor

dbew commented Jun 4, 2014

@jreback I'll look into this but we don't have python on windows here. I might have to try at home.

These failures

tslib.pyx", line 1032, in pandas.tslib._get_zone (pandas\tslib.c:17056)
IndexError: list index out of range

look like a difference in naming dateutil timezones between windows and linux. e.g. in linux

from dateutil.tz import gettz
gettz('US/Eastern')
Out[4]: tzfile('/usr/share/zoneinfo/US/Eastern')

so tslib.pyx:1032 splits the string at zoneinfo/. If that doesn't exist on windows, the split will fail.

As a start there, please can you run the following and paste the output?

from dateutil.tz import gettz
gettz('US/Eastern')

The others, I'm not sure about right now.

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

C:\Users\Jeff Reback\Documents\GitHub\pandas>c:\python27-64\python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from dateutil.tz import gettz
>>> gettz('US/Eastern')
tzfile('America/New_York')

@dbew
Copy link
Contributor

dbew commented Jun 4, 2014

Hmm. On Linux, I get

>>> from dateutil.tz import gettz
>>> gettz('US/Eastern')
tzfile('/usr/share/zoneinfo/US/Eastern')

It's a shame that the name changes on windows - you get America/New York not US/Eastern.

The code that's failing is in _get_zone in tslib.pyx:

cdef inline object _get_zone(object tz):
    if _is_utc(tz):
        return 'UTC'
    else:
        if _treat_tz_as_dateutil(tz):
            return 'dateutil/' + tz._filename.split('zoneinfo/')[1]
        ...

I think we'd be fine changing that last line to

return 'dateutil/' + tz._filename

and the tests pass on linux for me.

However, we rely on being able to round trip from tz -> zone name -> tz for storing data with ujson and pytables. That means that the following should hold:

tz == _maybe_get_tz(_get_zone(tz))

which boils down to:

tz = gettz('US/Eastern')
assert gettz(tz._filename) == tz

I've branched the head of pydata/pandas here and made this change. It works locally but I can't test on windows until I get home.

I'll dig into the other errors when I get python installed under windows.

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

i'll test a bit later, you might find this a good ref for installing on windows: https://github.com/pydata/pandas/tree/master/scripts/windows_builder

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

@dbew ok that seemed to fix all the tests except one, and this one is trivial:

https://github.com/pydata/pandas/blob/master/pandas/tools/tests/test_pivot.py#L500

when testing, use np.arange(6,dtype='int64') rather than range(6) in a comparison frame as this is type dependent (e.g. its int32 on windows, but 64 on all other platforms).

so pls make that changed and do a PR and should be good to go

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

@dbew I am going to merge your fix...no need to do a PR

@dbew
Copy link
Contributor

dbew commented Jun 4, 2014

ok, great. That test isn't in a file I changed in the original PR - strange that it's failing now. Looking at the code, I can't see how that's related to the dateutil stuff either. Could it be related to some of the other changes going in recently?

I've done a pull request for the first part, here

@dbew
Copy link
Contributor

dbew commented Jun 4, 2014

oops, we commented at the same time. I'll cancel the PR. Thanks for merging the fix.

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

merged via 6629446

@jreback jreback closed this as completed Jun 4, 2014
@dbew
Copy link
Contributor

dbew commented Jun 4, 2014

Thank you.

@jreback jreback reopened this Jun 4, 2014
@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

seems 26-32 is failing (i'll post if other builds are as well), with a lot less failures though.

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

======================================================================
ERROR: test_summary_dateutil (pandas.tseries.tests.test_daterange.TestDateRange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_daterange.py", line 303, in test_summary_dateutil
    bdate_range('1/1/2005', '1/1/2009', tz=dateutil.tz.gettz('UTC')).summary()
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 1920, in bdate_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 427, in _generate
    infer_dst=infer_dst)
  File "tslib.pyx", line 2114, in pandas.tslib.tz_localize_to_utc (pandas\tslib.c:31929)
  File "tslib.pyx", line 2031, in pandas.tslib._get_deltas (pandas\tslib.c:30568)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 65, in _isdst
    dston = picknthweekday(dt.year, self._dstmonth, self._dstdayofweek,
AttributeError: 'NoneType' object has no attribute 'year'

======================================================================
ERROR: test_index_convert_to_datetime_array_explicit_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_timeseries.py", line 484, in test_index_convert_to_datetime_array_explicit_dateutil
    rng_utc = date_range('20090415', '20090519', tz=dateutil.tz.gettz('UTC'))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 427, in _generate
    infer_dst=infer_dst)
  File "tslib.pyx", line 2114, in pandas.tslib.tz_localize_to_utc (pandas\tslib.c:31929)
  File "tslib.pyx", line 2031, in pandas.tslib._get_deltas (pandas\tslib.c:30568)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 65, in _isdst
    dston = picknthweekday(dt.year, self._dstmonth, self._dstdayofweek,
AttributeError: 'NoneType' object has no attribute 'year'

======================================================================
ERROR: test_period_resample_with_local_timezone_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_timeseries.py", line 2030, in test_period_resample_with_local_timezone_dateutil
    index = pd.date_range(start, end, freq='H')
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 324, in _generate
    start = Timestamp(start)
  File "tslib.pyx", line 196, in pandas.tslib.Timestamp.__new__ (pandas\tslib.c:5952)
  File "tslib.pyx", line 946, in pandas.tslib.convert_to_tsobject (pandas\tslib.c:16110)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 67, in _isdst
    self._dstweeknumber)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 166, in picknthweekday
    first = datetime.datetime(year, month, 1, hour, minute)
ValueError: month must be in 1..12

======================================================================
ERROR: test_to_period_tz_explicit_dateutil (pandas.tseries.tests.test_timeseries.TestTimeSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_timeseries.py", line 1578, in test_to_period_tz_explicit_dateutil
    ts = date_range('1/1/2000', '4/1/2000', tz=dateutil.tz.gettz('UTC'))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 1879, in date_range
    closed=closed)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 195, in __new__
    infer_dst=infer_dst)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 427, in _generate
    infer_dst=infer_dst)
  File "tslib.pyx", line 2114, in pandas.tslib.tz_localize_to_utc (pandas\tslib.c:31929)
  File "tslib.pyx", line 2031, in pandas.tslib._get_deltas (pandas\tslib.c:30568)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 65, in _isdst
    dston = picknthweekday(dt.year, self._dstmonth, self._dstdayofweek,
AttributeError: 'NoneType' object has no attribute 'year'

======================================================================
ERROR: test_cant_compare_tz_naive_w_aware_dateutil (pandas.tseries.tests.test_timeseries.TestTimestamp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_timeseries.py", line 3107, in test_cant_compare_tz_naive_w_aware_dateutil
    b = Timestamp('3/12/2012', tz=utc)
  File "tslib.pyx", line 196, in pandas.tslib.Timestamp.__new__ (pandas\tslib.c:5952)
  File "tslib.pyx", line 946, in pandas.tslib.convert_to_tsobject (pandas\tslib.c:16110)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 67, in _isdst
    self._dstweeknumber)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 166, in picknthweekday
    first = datetime.datetime(year, month, 1, hour, minute)
ValueError: month must be in 1..12

======================================================================
ERROR: test_class_ops_dateutil (pandas.tseries.tests.test_timeseries.TestTimestamp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\tests\test_timeseries.py", line 2950, in test_class_ops_dateutil
    compare(Timestamp.now('UTC'), datetime.now(timezone('UTC')))
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 67, in _isdst
    self._dstweeknumber)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 166, in picknthweekday
    first = datetime.datetime(year, month, 1, hour, minute)
ValueError: month must be in 1..12

======================================================================
ERROR: test_tz_dateutil (pandas.tests.test_format.TestStringRepTimestamp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tests\test_format.py", line 2952, in test_tz_dateutil
    self.assertEqual(str(dt_date), str(Timestamp(dt_date)))
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 67, in _isdst
    self._dstweeknumber)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 166, in picknthweekday
    first = datetime.datetime(year, month, 1, hour, minute)
ValueError: month must be in 1..12

======================================================================
ERROR: test_getitem_setitem_datetime_tz_dateutil (pandas.tests.test_series.TestSeries)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tests\test_series.py", line 4641, in test_getitem_setitem_datetime_tz_dateutil
    result[datetime(1990, 1, 1, 9, tzinfo=tz('UTC'))] = 0
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\core\series.py", line 617, in __setitem__
    self.loc[key] = value
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\core\indexing.py", line 117, in __setitem__
    indexer = self._convert_to_indexer(key, is_setter=True)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\core\indexing.py", line 991, in _convert_to_indexer
    return labels.get_loc(obj)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tseries\index.py", line 1305, in get_loc
    stamp = Timestamp(key, tz=self.tz)
  File "tslib.pyx", line 196, in pandas.tslib.Timestamp.__new__ (pandas\tslib.c:5952)
  File "tslib.pyx", line 923, in pandas.tslib.convert_to_tsobject (pandas\tslib.c:15790)
  File "tslib.pyx", line 864, in pandas.tslib._get_utcoffset (pandas\tslib.c:15138)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 32, in utcoffset
    if self._isdst(dt):
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 67, in _isdst
    self._dstweeknumber)
  File "C:\python26-32\lib\site-packages\dateutil\tzwin.py", line 166, in picknthweekday
    first = datetime.datetime(year, month, 1, hour, minute)
ValueError: month must be in 1..12

I'll fix this last one

======================================================================
FAIL: test_pivot_datetime_tz (pandas.tools.tests.test_pivot.TestPivotTable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\tools\tests\test_pivot.py", line 525, in test_pivot_datetime_tz
    tm.assert_frame_equal(result, expected)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\util\testing.py", line 585, in assert_frame_equal
    check_exact=check_exact)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\util\testing.py", line 526, in assert_series_equal
    assert_attr_equal('dtype', left, right)
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\util\testing.py", line 508, in assert_attr_equal
    assert_equal(left_attr,right_attr,"attr is not equal [{0}]" .format(attr))
  File "c:\Users\Jeff Reback\Documents\GitHub\pandas\build\lib.win32-2.6\pandas\util\testing.py", line 491, in assert_equal
    assert a == b, "%s: %r != %r" % (msg.format(a,b), a, b)
AssertionError: attr is not equal [dtype]: dtype('int64') != dtype('int32')

----------------------------------------------------------------------
Ran 7155 tests in 413.783s

FAILED (SKIP=396, errors=9, failures=1)

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

to make this even more complicated.

looks like dateutil==1.5 is the culprit and maybe only on 2.6 (e.g. I have 1.5 on 2.7 and it worked fine).

and only on windows (as I think the 2.6 build DOES run with 1.5 on travis).

@jreback
Copy link
Contributor Author

jreback commented Jun 4, 2014

happens on 33-32/33-64 with dateutil 2.2, so this is a windows issue then (and not 2.6/dateutil)

@dbew
Copy link
Contributor

dbew commented Jun 5, 2014

These ones

ValueError: month must be in 1..12

are due to a bug in dateutli on windows. You can get the UTC timezone but the following fails:

>>> from datetutil.tz import gettz
>>> gettz('UTC')._isdst(_any_date_)
...
ValueError: month must be in 1..12

It looks like the correct UTC timezone in dateutil on windows is Etc/UTC not UTC. Maybe we can make the choice of UTC timezone platform specific?

The other failures are slightly different, I don't yet understand why they're a problem on windows but not linux. I'm going to look into these a bit further.

@jreback
Copy link
Contributor Author

jreback commented Jun 5, 2014

can o u fix _is_utc to work?
or is this just a testissue?

@dbew
Copy link
Contributor

dbew commented Jun 5, 2014

I think this is just a test issue. The way dateutil handles UTC in gettz is a bit odd: It always prefers zones in the system timezone data (e.g. files in unix, registry in windows) over it's tzutz(), the sentinel object for the UTC zone.

In _is_utc we check if the timezone is an instance of the ``tzutc` sentinel class.

This means that it's very unlikely that _is_utc(gettz('UTC')) is defined correctly but is unlikely to return True - I imagine that both unix and windows will have system timezone data for UTC.

I'm looking at fixing the tests up now.

Was it just the python 26/ win32 build that failed on these tests?

@jreback
Copy link
Contributor Author

jreback commented Jun 5, 2014

no....fails on 3.2/3.3 as well (but NOT 2.7), odd

@dbew
Copy link
Contributor

dbew commented Jun 5, 2014

That's odd - because I can see the failures in py27/win64 under anaconda.

Anyway, I've dug in a bit more and I think using dateutil.tz.gettz('UTC') is the wrong way to construct UTC timezones in dateutil. I've changed the tests to use dateutil.tz.tzutc() instead and this seems to be better.

It's also consistent with the test in _is_utc which is checking for instances of that class.

I'll update the tests and if it looks good, I'll update the docs to show how to construct the dateutil/UTC timezone.

@jreback
Copy link
Contributor Author

jreback commented Jun 5, 2014

@dbew it could me just reading the setup... I have a window on my pc at home which shows all the runs (kind of like travis) and just prints out failures; its possible those tests are not being run for some reason. go ahead and submit a PR and I can give a test tongiht

@dbew
Copy link
Contributor

dbew commented Jun 5, 2014

Ok. It looks like the change to tzutc is working. I'll update the docs and submit a PR as soon as I can.

@jreback
Copy link
Contributor Author

jreback commented Jun 5, 2014

gr8! glad you got it working on windows!

@dbew
Copy link
Contributor

dbew commented Jun 5, 2014

@jreback Pull request submitted #7362.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Timezones Timezone data dtype Windows Windows OS
Projects
None yet
2 participants