You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import pandas as pd
In [2]: pd.Timestamp('2017') + pd.Series([pd.Period('2017', freq='M')])
Fatal Python error: Cannot recover from stack overflow.
Thread 0x00007000053d1000 (most recent call first):
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 295 in wait
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 551 in wait
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/core/history.py", line 829 in run
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/core/history.py", line 58 in needs_sqlite
File "<decorator-gen-24>", line 2 in run
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916 in _bootstrap_inner
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 884 in _bootstrap
Current thread 0x00007fff943f83c0 (most recent call first):
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.py", line 78 in <lambda>
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.py", line 713 in <lambda>
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.py", line 713 in safe_na_op
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.py", line 742 in wrapper
File "<ipython-input-2-5cbafe935254>", line 1 in <module>
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2862 in run_code
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2808 in run_ast_nodes
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2698 in run_cell
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 471 in interact
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 480 in mainloop
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/terminal/ipapp.py", line 356 in start
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/traitlets/config/application.py", line 658 in launch_instance
File "/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/IPython/__init__.py", line 125 in start_ipython
File "/Users/taugspurger/.virtualenvs/pandas-dev/bin/ipython", line 11 in <module>
The other way hits a maximum recursion error:
In [1]: importpandasaspdIn [2]: pd.Series([pd.Period('2017', freq='M')]) +pd.Timestamp('2017')
---------------------------------------------------------------------------RecursionErrorTraceback (mostrecentcalllast)
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.pyinsafe_na_op(lvalues, rvalues)
698withnp.errstate(all='ignore'):
-->699returnna_op(lvalues, rvalues)
700exceptException:
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.pyinna_op(x, y)
674try:
-->675result=expressions.evaluate(op, str_rep, x, y, **eval_kwargs)
676exceptTypeError:
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/computation/expressions.pyinevaluate(op, op_str, a, b, use_numexpr, **eval_kwargs)
203ifuse_numexpr:
-->204return_evaluate(op, op_str, a, b, **eval_kwargs)
205return_evaluate_standard(op, op_str, a, b)
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/computation/expressions.pyin_evaluate_numexpr(op, op_str, a, b, truediv, reversed, **eval_kwargs)
118ifresultisNone:
-->119result=_evaluate_standard(op, op_str, a, b)
120~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/computation/expressions.pyin_evaluate_standard(op, op_str, a, b, **eval_kwargs)
63withnp.errstate(all='ignore'):
--->64returnop(a, b)
65~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/tslib.pyxinpandas._libs.tslib.Timestamp.__radd__()
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/period.pyxinpandas._libs.period._Period.__add__()
... last2framesrepeated, fromtheframebelow ...
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/tslib.pyxinpandas._libs.tslib.Timestamp.__radd__()
RecursionError: maximumrecursiondepthexceededwhilecallingaPythonobjectDuringhandlingoftheaboveexception, anotherexceptionoccurred:
RecursionErrorTraceback (mostrecentcalllast)
<ipython-input-2-18743c02baa6>in<module>()
---->1pd.Series([pd.Period('2017', freq='M')]) +pd.Timestamp('2017')
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.pyinwrapper(left, right, name, na_op)
736lvalues=lvalues.values737-->738result=wrap_results(safe_na_op(lvalues, rvalues))
739returnconstruct_result(
740left,
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.pyinsafe_na_op(lvalues, rvalues)
707ifis_object_dtype(lvalues):
708returnlibalgos.arrmap_object(lvalues,
-->709lambdax: op(x, rvalues))
710raise711~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/algos_common_helper.pxiinpandas._libs.algos.arrmap_object()
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/core/ops.pyin<lambda>(x)
707ifis_object_dtype(lvalues):
708returnlibalgos.arrmap_object(lvalues,
-->709lambdax: op(x, rvalues))
710raise711~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/tslib.pyxinpandas._libs.tslib.Timestamp.__radd__()
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/period.pyxinpandas._libs.period._Period.__add__()
... last2framesrepeated, fromtheframebelow ...
~/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/_libs/tslib.pyxinpandas._libs.tslib.Timestamp.__radd__()
RecursionError: maximumrecursiondepthexceededwhilecallingaPythonobject
The text was updated successfully, but these errors were encountered:
FWIW the segfault appears to be specific to IPython. In the standard interpreter I just get the RecursionError in both py2+py3. Should be an easy patch; should I hold off until after the next release?
No time to look atm:
The other way hits a maximum recursion error:
The text was updated successfully, but these errors were encountered: