Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ( bracket does not always appear from input in IPython console #17144

Closed
dylansolms opened this issue Jan 6, 2022 · 3 comments
Closed

The ( bracket does not always appear from input in IPython console #17144

dylansolms opened this issue Jan 6, 2022 · 3 comments

Comments

@dylansolms
Copy link

Description

What steps will reproduce the problem?

When using functions in the Ipython console, the open bracket does not appear from keyboard input, i.e. ( is ignored/skipped.

Hence, using my_func one ends up with something like my_func*args)

This usually occurs once large data structures have been created and memory becomes low.

Traceback

  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/ipythonconsole/widgets/control.py", line 58, in keyPressEvent
    self._key_paren_left(text)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/ipythonconsole/widgets/control.py", line 50, in _key_paren_left
    self.show_object_info(last_obj)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/widgets/mixins.py", line 1356, in show_object_info
    self.help.set_object_text(text, ignore_unknown=False)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/help/plugin.py", line 504, in set_object_text
    found = self.show_help(text, ignore_unknown=ignore_unknown)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/help/plugin.py", line 682, in show_help
    if not shell.is_defined(obj_text):
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/ipythonconsole/widgets/help.py", line 135, in is_defined
    ).is_defined(objtxt, force_import=force_import)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 542, in __call__
    call_dict, call_data, self._comm_id)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder/plugins/ipythonconsole/comms/kernelcomm.py", line 114, in _get_call_return_value
    call_dict, call_data, comm_id)
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 420, in _get_call_return_value
    return self._sync_error(reply['value'])
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 480, in _sync_error
    error_wrapper.raise_error()
  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 90, in raise_error
    raise self.etype(self)
Exception in comms call is_defined:

  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 342, in _handle_remote_call
    buffer['call_kwargs'])

  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/comms/commbase.py", line 353, in _remote_callback
    *call_args, **call_kwargs)

  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/console/kernel.py", line 326, in is_defined
    return isdefined(obj, force_import=force_import, namespace=ns)

  File "/home/dylan/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/dochelpers.py", line 317, in isdefined
    attr_not_found = not hasattr(eval(base, namespace), attr)

TypeError: idx2value() missing 1 required positional argument: 'idx'

Versions

  • Spyder version: 4.0.1
  • Python version: 3.7.6
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Linux 5.11.0-44-generic

Dependencies

atomicwrites >=1.2.0         :  1.4.0 (OK)
chardet >=2.0.0              :  4.0.0 (OK)
cloudpickle >=0.5.0          :  2.0.0 (OK)
diff_match_patch >=20181111  :  20200713 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.22.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
keyring                      :  None (OK)
nbconvert >=4.0              :  6.1.0 (OK)
numpydoc >=0.6.0             :  1.1.0 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.8.0 (OK)
pygments >=2.0               :  2.10.0 (OK)
pylint >=0.25                :  2.9.6 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
xdg >=0.26                   :  0.27 (OK)
zmq >=17                     :  22.2.1 (OK)
qdarkstyle >=2.7             :  3.0.2 (OK)
qtawesome >=0.5.7            :  1.0.2 (OK)
qtconsole >=4.6.0            :  5.1.1 (OK)
qtpy >=1.5.0                 :  1.10.0 (OK)
rtree >=0.8.3                :  0.9.7 (OK)
sphinx >=0.6.6               :  4.2.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  0.29.24 (OK)
matplotlib >=2.0.0           :  3.4.2 (OK)
numpy >=1.7                  :  1.19.2 (OK)
pandas >=0.13.1              :  1.3.3 (OK)
scipy >=0.17.0               :  1.6.2 (OK)
sympy >=0.7.3                :  1.8 (OK)
@ccordoba12
Copy link
Member

Hey @dylansolms, thanks for reporting. We'll fix this problem in our next version (5.2.2), to be released in a couple of weeks.

@ccordoba12 ccordoba12 self-assigned this Jan 7, 2022
@ccordoba12 ccordoba12 added this to the v5.2.2 milestone Jan 7, 2022
@ccordoba12 ccordoba12 changed the title The ( bracket does not always appear from input in Ipython console The ( bracket does not always appear from input in IPython console Jan 10, 2022
@dylansolms
Copy link
Author

Thank you very much for your hard work.

@ccordoba12
Copy link
Member

No problem. Just don't forget to update to 5.2.2 once it's released (you're using 4.0.1, which is two years old now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants