{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11169","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11169/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11169/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11169/events","html_url":"https://github.com/pydata/pandas/issues/11169","id":107751247,"number":11169,"title":"test_constructor_compound_dtypes and test_invalid_index_types fail in parse_datetime_string","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-22T16:28:36Z","updated_at":"2015-09-22T18:34:53Z","closed_at":null,"body":"Debian stretch/sid, cython 0.22.1-2, pandas v0.17.0rc1-92-gc6bcc99\r\n```\r\n$> locale\r\nLANG=en_US.UTF-8\r\nLANGUAGE=\r\nLC_CTYPE=\"en_US.UTF-8\"\r\nLC_NUMERIC=\"en_US.UTF-8\"\r\nLC_TIME=\"en_US.UTF-8\"\r\nLC_COLLATE=\"en_US.UTF-8\"\r\nLC_MONETARY=\"en_US.UTF-8\"\r\nLC_MESSAGES=\"en_US.UTF-8\"\r\nLC_PAPER=\"en_US.UTF-8\"\r\nLC_NAME=\"en_US.UTF-8\"\r\nLC_ADDRESS=\"en_US.UTF-8\"\r\nLC_TELEPHONE=\"en_US.UTF-8\"\r\nLC_MEASUREMENT=\"en_US.UTF-8\"\r\nLC_IDENTIFICATION=\"en_US.UTF-8\"\r\nLC_ALL=\r\n```\r\n`nosetest pandas` leads to\r\n```\r\n$> nosetests -s -v --failed pandas --pdb\r\n#1982 test_invalid_index_types (pandas.tseries.tests.test_frequencies.TestFrequencyInference) ... > /usr/lib/python2.7/dist-packages/dateutil/parser.py(310)parse()\r\n-> res, skipped_tokens = self._parse(timestr, **kwargs)\r\n(Pdb) p timestr\r\nu'\\u05e4\\u05d0\\u05e3\\u05df\\u05e1\\u05da\\u05e8\\u05e1\\u05e7\\u05df'\r\n(Pdb) self._parse(timestr, **kwargs)\r\n(Pdb) up\r\n> /usr/lib/python2.7/dist-packages/dateutil/parser.py(748)parse()\r\n-> return DEFAULTPARSER.parse(timestr, **kwargs)\r\n(Pdb) p timestr\r\nu'\\u05e4\\u05d0\\u05e3\\u05df\\u05e1\\u05da\\u05e8\\u05e1\\u05e7\\u05df'\r\n(Pdb) p DEFAULTPARSER\r\n<dateutil.parser.parser object at 0x7f79dcacf090>\r\n*(Pdb) p timestr.encode()\r\n*** UnicodeEncodeError: UnicodeEncodeError('ascii', u'\\u05e4\\u05d0\\u05e3\\u05df\\u05e1\\u05da\\u05e8\\u05e1\\u05e7\\u05df', 0, 10, 'ordinal not in range(128)')\r\n*(Pdb) p timestr.encode('utf-8')\r\n'\\xd7\\xa4\\xd7\\x90\\xd7\\xa3\\xd7\\x9f\\xd7\\xa1\\xd7\\x9a\\xd7\\xa8\\xd7\\xa1\\xd7\\xa7\\xd7\\x9f'\r\n(Pdb) \r\nERROR\r\n#3617 test_constructor_compound_dtypes (pandas.tests.test_frame.TestDataFrame) ... > /usr/lib/python2.7/dist-packages/dateutil/parser.py(310)parse()\r\n-> res, skipped_tokens = self._parse(timestr, **kwargs)\r\n(Pdb) \r\nERROR\r\n\r\n======================================================================\r\nERROR: test_invalid_index_types (pandas.tseries.tests.test_frequencies.TestFrequencyInference)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tests/test_frequencies.py\", line 565, in test_invalid_index_types\r\n    self.assertRaises(ValueError, lambda : frequencies.infer_freq(i))\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/util/testing.py\", line 1880, in assertRaises\r\n    _callable(*args, **kwargs)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tests/test_frequencies.py\", line 565, in <lambda>\r\n    self.assertRaises(ValueError, lambda : frequencies.infer_freq(i))\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/frequencies.py\", line 855, in infer_freq\r\n    index = pd.DatetimeIndex(index)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/util/decorators.py\", line 89, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/index.py\", line 315, in __new__\r\n    subarr = tools.to_datetime(data, box=False)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/util/decorators.py\", line 89, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 276, in to_datetime\r\n    unit=unit, infer_datetime_format=infer_datetime_format)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 395, in _to_datetime\r\n    return _convert_listlike(arg, box, format)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 372, in _convert_listlike\r\n    require_iso8601=require_iso8601)\r\n  File \"pandas/tslib.pyx\", line 1828, in pandas.tslib.array_to_datetime (pandas/tslib.c:34125)\r\n    cpdef array_to_datetime(ndarray[object] values, errors='raise',\r\n  File \"pandas/tslib.pyx\", line 2017, in pandas.tslib.array_to_datetime (pandas/tslib.c:33760)\r\n    raise\r\n  File \"pandas/tslib.pyx\", line 2011, in pandas.tslib.array_to_datetime (pandas/tslib.c:33658)\r\n    oresult[i] = parse_datetime_string(val, dayfirst=dayfirst,\r\n  File \"pandas/tslib.pyx\", line 1602, in pandas.tslib.parse_datetime_string (pandas/tslib.c:27245)\r\n    dt = parse_date(date_string, default=_DEFAULT_DATETIME,\r\n  File \"/usr/lib/python2.7/dist-packages/dateutil/parser.py\", line 748, in parse\r\n    return DEFAULTPARSER.parse(timestr, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/dateutil/parser.py\", line 310, in parse\r\n    res, skipped_tokens = self._parse(timestr, **kwargs)\r\nTypeError: 'NoneType' object is not iterable\r\n\r\n======================================================================\r\nERROR: test_constructor_compound_dtypes (pandas.tests.test_frame.TestDataFrame)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tests/test_frame.py\", line 14395, in test_constructor_compound_dtypes\r\n    f('M8[ns]')\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tests/test_frame.py\", line 14384, in f\r\n    columns=[\"A\", \"B\", \"C\"], dtype=dtype)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/frame.py\", line 264, in __init__\r\n    arrays, columns = _to_arrays(data, columns, dtype=dtype)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/frame.py\", line 5216, in _to_arrays\r\n    dtype=dtype)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/frame.py\", line 5299, in _list_to_arrays\r\n    coerce_float=coerce_float)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/frame.py\", line 5366, in _convert_object_array\r\n    arrays = [ convert(arr) for arr in content ]\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/frame.py\", line 5363, in convert\r\n    arr = com._possibly_cast_to_datetime(arr, dtype)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/core/common.py\", line 1998, in _possibly_cast_to_datetime\r\n    value = to_datetime(value, errors=errors)._values\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/util/decorators.py\", line 89, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 276, in to_datetime\r\n    unit=unit, infer_datetime_format=infer_datetime_format)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 395, in _to_datetime\r\n    return _convert_listlike(arg, box, format)\r\n  File \"/home/yoh/deb/gits/pkg-exppsy/pandas/pandas/tseries/tools.py\", line 372, in _convert_listlike\r\n    require_iso8601=require_iso8601)\r\n  File \"pandas/tslib.pyx\", line 1828, in pandas.tslib.array_to_datetime (pandas/tslib.c:34125)\r\n    cpdef array_to_datetime(ndarray[object] values, errors='raise',\r\n  File \"pandas/tslib.pyx\", line 2017, in pandas.tslib.array_to_datetime (pandas/tslib.c:33760)\r\n    raise\r\n  File \"pandas/tslib.pyx\", line 2011, in pandas.tslib.array_to_datetime (pandas/tslib.c:33658)\r\n    oresult[i] = parse_datetime_string(val, dayfirst=dayfirst,\r\n  File \"pandas/tslib.pyx\", line 1602, in pandas.tslib.parse_datetime_string (pandas/tslib.c:27245)\r\n    dt = parse_date(date_string, default=_DEFAULT_DATETIME,\r\n  File \"/usr/lib/python2.7/dist-packages/dateutil/parser.py\", line 748, in parse\r\n    return DEFAULTPARSER.parse(timestr, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/dateutil/parser.py\", line 310, in parse\r\n    res, skipped_tokens = self._parse(timestr, **kwargs)\r\nTypeError: 'NoneType' object is not iterable\r\n\r\n----------------------------------------------------------------------\r\nRan 2 tests in 59.805s\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/142376118","html_url":"https://github.com/pydata/pandas/issues/11169#issuecomment-142376118","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11169","id":142376118,"user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T18:34:53Z","updated_at":"2015-09-22T18:34:53Z","body":"what I mean is that we skip these on windows (never could really figure it out), yet it works on our travis builds (linux) and macosx. So *something* is different. I think its some kind of encoding issue."}}