conda update spyder
(or pip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
'FutureWarning' generated in error - appears to be a bug. Fresh install of Spyder Python 3.6.5 via Anaconda, just two lines of code in a new console (below) begin to trigger error - after a multi-hour work session. Thank you!
Object is created as requested - but I get additional error:
C:\Users\pjacob\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\utils.py:414: FutureWarning: 'summary' is deprecated and will be removed in a future version.
display = value.summary()
Once it starts, this error comes up after every line of code executed in the console, e.g., print(1+1)
PASTE TRACEBACK HERE
PASTE DEPENDENCIES HERE
IPython >=4.0 : 6.4.0 (OK)
cython >=0.21 : 0.28.2 (OK)
jedi >=0.9.0 : 0.12.0 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
numpy >=1.7 : 1.14.3 (OK)
pandas >=0.13.1 : 0.23.0 (OK)
pycodestyle >=2.3: 2.4.0 (OK)
pyflakes >=0.6.0 : 1.6.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.8.4 (OK)
qtconsole >=4.2.0: 4.3.1 (OK)
rope >=0.9.4 : 0.10.7 (OK)
sphinx >=0.6.6 : 1.7.4 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
Pandas has deprecated Index.summary()
in favor of Index._summary()
as per:
Issue: https://github.com/pandas-dev/pandas/issues/18217
PR: https://github.com/pandas-dev/pandas/pull/20028
Thank you, quite helpful - but note a couple of issues: (1) Once this warning occurs, ANY executed statement provokes the warning, for example: print(1+1). Also, since the old Index.summary() is invoked by certain DateTimeIndex object references, the warning is triggered - and repeats continuously - without a direct invocation of Index.summary().
Yes clearly this needs to be fixed.
If you want you can test a possible workaround, try changing:
C:\Users\pjacob\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\widgets\variableexplorer\utils.py line 414
from
display = value.summary()
to
display = value._summary()
and see if that fixes the problem. Then we will have a possible solution.
That fixes the problem for me.
I'm having the same problem. Another workaround is to suppress the message with:
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
Great, thanks very much for the help & focus on this.
@dalthviz, please help me to solve this one. Here
https://travis-ci.org/spyder-ide/spyder/jobs/395955090#L1512
you can find here all warnings generated by the latest Pandas.
For each one please do the following:
try:
display = value._summary()
except AttributeError:
display = value.summary()
This is for summary
, but you get the idea for the rest of them: the new method name must be called first and the old one second. This way we will guarantee compatibility with old Pandas versions and avoid these warnings.