In [135]: x = df['remove_time'][2]
In [136]: pd.Timestamp.max
Out[136]: Timestamp('2262-04-11 23:47:16.854775807')
In [137]: print(df['remove_time'][2])
NaT
In [138]: x = df['remove_time'][2]
In [139]:
Then, I click the 'x' in Variable Explorer.
File "/home/hechu/anaconda3/lib/python3.7/site-packages/spyder/widgets/variableexplorer/collectionseditor.py", line 615, in setEditorData
editor.setDateTime(QDateTime(value.date(), value.time()))
File "pandas/_libs/tslibs/nattype.pyx", line 59, in pandas._libs.tslibs.nattype._make_error_func.f
ValueError: NaTType does not support time
pyflakes >=0.6.0 : 2.0.0 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
sphinx >=0.6.6 : 1.8.2 (OK)
rope >=0.9.4 : 0.11.0 (OK)
jedi >=0.9.0 : 0.13.1 (OK)
psutil >=0.3 : 5.4.8 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
pandas >=0.13.1 : 0.23.4 (OK)
numpy >=1.7 : 1.15.1 (OK)
sympy >=0.7.3 : 1.3 (OK)
cython >=0.21 : 0.29 (OK)
qtconsole >=4.2.0 : 4.4.2 (OK)
IPython >=4.0 : 7.1.1 (OK)
matplotlib >=2.0.0: 2.2.3 (OK)
pylint >=0.25 : 2.1.1 (OK)
@juanis2112, I think we should catch the error and pass in this case, because there's nothing we can show about a NaT.
Some helpful linlks:
Thanks for the bug fix, I will learn the link above and try to avoid show NaT in Variable Explorer.
@gzhechu, we haven't been able to generate a fix for this problem, but we'll try to do it for Spyder 4.
I think this is related to #12550 @dalthviz
Should we mark this as duplicated @goanpeca or maybe the other one as duplicated of this one ?
Up to you :-), it might be a different but related issue.