question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning with iPython during executing certain commands in the console.

See original GitHub issue

PS0: Downgrading ipython to 6.5.0 solves this.

Problem Description

A “DeprecationWarning” is triggered when executing certain commands in the console,like “import a as b”,but not occurs everytime as described in the senario below.

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.0.1 -- An enhanced Interactive Python.

import nilmtk

import nilmtk as nt
d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:444: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

import keras as k
d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:444: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)
Using TensorFlow backend.

Moreover, sometimes I need to hit the Enter key twice more to execute a certain command even that command is intact, with which the DeprecationWarning appears possibly.


d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:448: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

import numpy

d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:448: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

PS: The first deprecation warning above “import numpy” appears when the command is executed but appears ahead of the command line.

PS1: Have tried in QtConsole just now, it happens too sometimes.

Versions

  • Spyder version: 3.3.1
  • Python version: 3.6.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Windows Server 2016 1607

Dependencies

IPython >=4.0 : 7.0.1 (OK) cython >=0.21 : 0.29 (OK) jedi >=0.9.0 : 0.13.1 (OK) matplotlib >=2.0.0: 3.0.0 (OK) nbconvert >=4.0 : 5.3.1 (OK) numpy >=1.7 : 1.15.2 (OK) pandas >=0.13.1 : 0.23.4 (OK) pycodestyle >=2.3 : 2.4.0 (OK) pyflakes >=0.6.0 : 2.0.0 (OK) pygments >=2.0 : 2.2.0 (OK) pylint >=0.25 : 2.1.1 (OK) qtconsole >=4.2.0 : 4.4.1 (OK) rope >=0.9.4 : 0.11.0 (OK) sphinx >=0.6.6 : 1.8.1 (OK) sympy >=0.7.3 : 1.1.1 (OK)

Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
paulmadejongcommented, Apr 2, 2020

Same problem here on a Macbook with Spyder4 and IPython 7.5.0. Perhaps the issue should be reopend?

2reactions
ccordoba12commented, Oct 20, 2018

In the meantime you can downgrade to IPython 6 to avoid this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPython console fails when running Python with "-W error"
IPython console fails when running Python with "-W error" ... in __init__ DeprecationWarning, stacklevel=2) DeprecationWarning: The `use_readline` parameter ...
Read more >
warnings — Warning control — Python 3.11.1 documentation
Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that...
Read more >
python - Hide all warnings in IPython - Stack Overflow
I hide the warnings in the pink boxes by running the following code in a ... does not work in Jupyter (at least...
Read more >
IPython reference — IPython 3.2.1 documentation
# Try running this code both at the command line and from inside IPython (with # %run example-embed.py) from IPython.config.loader import Config try: ......
Read more >
How to capture warnings — pytest documentation
... pytest now automatically catches warnings during test execution and ... the @pytest.mark.filterwarnings to add warning filters to specific test items, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found