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.

TypeError: __init__() got an unexpected keyword argument 'inputhook'

See original GitHub issue

I updated all my Python packages this morning and IPython doesn’t work anymore since then. Error:

Traceback (most recent call last):
  File "/home/nschloe/.local/bin/ipython", line 8, in <module>
    sys.exit(start_ipython())
  File "/home/nschloe/.local/lib/python3.7/site-packages/IPython/__init__.py", line 125, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 663, in launch_instance
    app.initialize(argv)
  File "</home/nschloe/.local/lib/python3.7/site-packages/decorator.py:decorator-gen-113>", line 2, in initialize
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/nschloe/.local/lib/python3.7/site-packages/IPython/terminal/ipapp.py", line 317, in initialize
    self.init_shell()
  File "/home/nschloe/.local/lib/python3.7/site-packages/IPython/terminal/ipapp.py", line 333, in init_shell
    ipython_dir=self.ipython_dir, user_ns=self.user_ns)
  File "/usr/lib/python3/dist-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/home/nschloe/.local/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py", line 464, in __init__
    self.init_prompt_toolkit_cli()
  File "/home/nschloe/.local/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py", line 296, in init_prompt_toolkit_cli
    **self._extra_prompt_options())
TypeError: __init__() got an unexpected keyword argument 'inputhook'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
Carreaucommented, Nov 25, 2019

Downgrade prompt_toolkit ? Seem like Prompt toolkit 3.0 was released yesterday.

3reactions
lijunzhcommented, Dec 3, 2019

downgrade prompt_toolkit package

In conda use the following command to downgrade:

conda install prompt_toolkit==2.0.10
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - iPython gives error for unexpected keyword argument ...
_extra_prompt_options()) TypeError: __init__() got an unexpected keyword argument 'inputhook' If you suspect this is an IPython bug, ...
Read more >
jupyter typeerror: __init__() got an unexpected keyword argument ...
__init__() got an unexpected keyword argument 'user_id' in django Hot Network Questions The 5e Inquisitive Subclass allows perception checks as a bonus action....
Read more >
__init__() got an unexpected keyword argument 'method'
The error init() got an unexpected keyword argument 'step_max' essentially means that the code is telling python to create an object with some...
Read more >
centos7安装ipython3遇到的问题 - CSDN博客
pip3 install traitlets第二个问题:TypeError: __init__() got an unexpected keyword argument 'inputhook'参考这个链接:参考执行这行命令 ...
Read more >
TypeError: __init__() got an ... - fast.ai Course Forums
12/x64/lib/python3.6/site-packages/fastcore/utils.py", line 693, in __init__ super().__init__(max_workers, mp_context= ...
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