[issue28892] pandas.to_datetime crashes in 3.6b4
Dale
report at bugs.python.org
Tue Dec 6 21:52:27 EST 2016
New submission from Dale:
I'm trying 3.6b4 on my mac (OS X 10.10.5) and when I run the following code (after doing pip install numpy and pandas) I see a 'SystemError':
>>> import pandas as pd
>>> pd.to_datetime('10/31/2016')
ValueError: Error parsing datetime string "10/31/2016" at position 2
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/schouten/virtualenvs/tmp/lib/python3.6/site-packages/pandas/util/decorators.py", line 91, in wrapper
return func(*args, **kwargs)
File "/Users/schouten/virtualenvs/tmp/lib/python3.6/site-packages/pandas/tseries/tools.py", line 430, in to_datetime
return _convert_listlike(np.array([arg]), box, format)[0]
File "/Users/schouten/virtualenvs/tmp/lib/python3.6/site-packages/pandas/tseries/tools.py", line 401, in _convert_listlike
require_iso8601=require_iso8601
File "pandas/tslib.pyx", line 2302, in pandas.tslib.array_to_datetime (pandas/tslib.c:43278)
File "pandas/tslib.pyx", line 2458, in pandas.tslib.array_to_datetime (pandas/tslib.c:41773)
File "pandas/tslib.pyx", line 2416, in pandas.tslib.array_to_datetime (pandas/tslib.c:41009)
File "pandas/src/datetime.pxd", line 141, in datetime._string_to_dts (pandas/tslib.c:90460)
SystemError: <class 'str'> returned a result with an error set
>>>
sys.version says:
>>> import sys
>>> sys.version
'3.6.0b4 (v3.6.0b4:18496abdb3d5, Nov 21 2016, 20:44:47) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>>
With 3.5 it works as expected:
>>> import sys
>>> sys.version
'3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>> import pandas as pd
>>> pd.to_datetime('10/31/2016')
Timestamp('2016-10-31 00:00:00')
>>>
I know it looks like pandas might be at fault, but given that the only thing I've changed is the Python version, I'm thinking it might be exposing a 3.6 bug (or vice versa, I suppose).
My apologies if I'm doing this all wrong, I'm new around here.
----------
components: Extension Modules, Interpreter Core, macOS
messages: 282588
nosy: Schouten, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: pandas.to_datetime crashes in 3.6b4
type: crash
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28892>
_______________________________________
More information about the Python-bugs-list
mailing list