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

Spyder crashes when the IPython console is disabled #19610

Closed
5 of 10 tasks
sphh opened this issue Sep 26, 2022 · 6 comments
Closed
5 of 10 tasks

Spyder crashes when the IPython console is disabled #19610

sphh opened this issue Sep 26, 2022 · 6 comments

Comments

@sphh
Copy link
Contributor

sphh commented Sep 26, 2022

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

I had to restart my desktop environment through a reboot. Spyder was running at that time with one file not saved.

After the restart, I started Spyder from the start menu. It showed me the file recovery dialog, I agreed to the recovery and then Spyder exited. When I tried it again, the recovery dialog was not displayed. (Where would I now find the recovered file?), but Spyder still did not start.

I then started Spyder from the terminal with spyder --debug-info verbose --debug-output file. The spyder-debug.log (with the traceback spliced in) is attached.

What is the expected output? What do you see instead?

Please see spyder-debug.log

Paste Traceback/Error Below (if applicable)

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/spyder/api/widgets/menus.py", line 225, in _render
    section, before_section = next(iter_sections)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/spyder", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/spyder/app/start.py", line 252, in main
    mainwindow.main(options, args)
  File "/usr/local/lib/python3.8/dist-packages/spyder/app/mainwindow.py", line 1956, in main
    mainwindow = create_window(MainWindow, app, splash, options, args)
  File "/usr/local/lib/python3.8/dist-packages/spyder/app/utils.py", line 300, in create_window
    main.post_visible_setup()
  File "/usr/local/lib/python3.8/dist-packages/spyder/app/mainwindow.py", line 1057, in post_visible_setup
    plugin.on_mainwindow_visible()
  File "/usr/local/lib/python3.8/dist-packages/spyder/plugins/mainmenu/plugin.py", line 86, in on_mainwindow_visible
    menu._render()
  File "/usr/local/lib/python3.8/dist-packages/spyder/api/widgets/menus.py", line 246, in _render
    raise SpyderAPIError(
spyder.api.exceptions.SpyderAPIError: You're trying to introduce some sections before others that don't have any actions. This is the list of (section, before_section) that's failing to be added:

[('documentation_section', 'support_section'), ('support_section', 'external_documentation_section')]

Versions

  • Spyder version: 5.3.3
  • Python version: 3.8.10
  • Qt version: 5.15.2 (?)
  • PyQt version: 5.15.7
  • Operating System name/version: Linux Mint 20.3

Dependencies

N/A.

@sphh
Copy link
Contributor Author

sphh commented Sep 26, 2022

After calling spyder --reset, spyder started without any error message. (I still have the old configuration, if that is needed …)

@ccordoba12
Copy link
Member

Hey @sphh, thanks for reporting. I'm going to close this because it's already solved.

@sphh
Copy link
Contributor Author

sphh commented Sep 27, 2022

Is this solved, because of spyder --reset or because of a commit?

@sphh
Copy link
Contributor Author

sphh commented Sep 27, 2022

I compared the .config/spyder-py3/config/spyder.ini file and found the culprit:

If I run spyder --reset and then set

[ipython_console]
enable = False

I can reproduce the above error on my installation!

@ccordoba12: Does this qualify this issue to be reopened?

@ccordoba12
Copy link
Member

Yeah, I tested this locally and you're right, Spyder crashes with this error if the IPython console is disabled.

@ccordoba12 ccordoba12 reopened this Sep 27, 2022
@ccordoba12 ccordoba12 changed the title SpyderAPIError: unintroduced_sections Spyder crashes when the IPython console is disabled Sep 27, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.4.0, v5.4.1 Sep 27, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.4.2, v5.4.1 Oct 23, 2022
@ccordoba12 ccordoba12 self-assigned this Oct 23, 2022
@sphh
Copy link
Contributor Author

sphh commented Dec 11, 2022

🙇

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

3 participants