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 5.1 crash in Ubuntu's Unity #16161

Closed
beew opened this issue Aug 6, 2021 · 16 comments
Closed

Spyder 5.1 crash in Ubuntu's Unity #16161

beew opened this issue Aug 6, 2021 · 16 comments

Comments

@beew
Copy link

beew commented Aug 6, 2021

When start Spyder in the terminal I got these

$ spyder
Traceback (most recent call last):
  File "/home/beew/.local/lib/python3.9/site-packages/spyder/api/widgets/menus.py", line 179, in _render
    section, before_section = next(iter_sections)
StopIteration
Traceback (most recent call last):
  File "/home/beew/.local/lib/python3.9/site-packages/spyder/api/widgets/menus.py", line 179, in _render
    section, before_section = next(iter_sections)
StopIteration

Spyder 5.1.1, OS is Ubuntu21.04, Python 3.9.5, PyQt5 5.12.3

@ccordoba12
Copy link
Member

Hey @beew, thanks for reporting. Is that the entire error you're getting?

@ccordoba12
Copy link
Member

Or you only posted the last lines of your error?

@beew
Copy link
Author

beew commented Aug 6, 2021

@ccordoba12

Hi, that was the whole thing.

@ccordoba12
Copy link
Member

Ok, please run

spyder --debug-info verbose --debug-output file

and upload here a file called spyder-debug.log that Spyder creates with those options in the directory where you run it.

@beew
Copy link
Author

beew commented Aug 6, 2021

Hi, here it is.
spyder-debug.log

@ccordoba12
Copy link
Member

This is very odd because I don't see anything strange in your log file (not even the error above).

Please close Spyder, run in the terminal

spyder --reset

and try again. That could help.

@beew
Copy link
Author

beew commented Aug 6, 2021

Tried already. Still the same.

@beew
Copy link
Author

beew commented Aug 6, 2021

So it seems to have something to do with my DE. This occurs in unity but not in gnome. Is this harmless?

@ccordoba12
Copy link
Member

Ok, thanks for that extra info. It seems there's a problem with the new way we render menus and Unity (I guess due to Unity's global menu bar).

We'll take a look at that problem in a future release.

@ccordoba12 ccordoba12 added this to the v5.1.2 milestone Aug 7, 2021
@ccordoba12 ccordoba12 changed the title Error message at startup Spyder 5.1 crash in Ubuntu's Unity Aug 7, 2021
@beew
Copy link
Author

beew commented Aug 7, 2021

@ccordoba12

Thanks.

@ccordoba12 ccordoba12 modified the milestones: v5.1.2, v5.2.0 Aug 11, 2021
@mrclary
Copy link
Contributor

mrclary commented Sep 2, 2021

@ccordoba12, I've noticed this same error intermittently on macOS when testing the standalone application. For me, when this occurs, I simply try to relaunch again and it will work. As I say, it is intermittent, so I think that it may be some kind of race condition. Nevertheless, I made a point to capture the traceback on one of the occurrences. Unfortunately, I usually run with minimal verbosity, so that is what I caught.

debug-info
(spy-build) >> dist/Spyder.app/Contents/MacOS/Spyder --debug-info=minimal
2021-08-28 22:05:06,732 [INFO] [spyder.app.mainwindow] -> Start of MainWindow constructor
2021-08-28 22:05:06,733 [INFO] [spyder.app.mainwindow] -> End of MainWindow constructor
2021-08-28 22:05:07,014 [INFO] [spyder.app.mainwindow] -> *** Start of MainWindow setup ***
2021-08-28 22:05:07,014 [INFO] [spyder.app.mainwindow] -> Updating PYTHONPATH
2021-08-28 22:05:07,015 [INFO] [spyder.app.mainwindow] -> Applying theme configuration...
2021-08-28 22:05:07,029 [INFO] [spyder.app.mainwindow] -> Loading switcher...
2021-08-28 22:05:08,705 [INFO] [spyder.app.mainwindow] -> Loading Appearance...
2021-08-28 22:05:08,797 [INFO] [spyder.app.mainwindow] -> Loading appearance...
2021-08-28 22:05:08,797 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for appearance...
2021-08-28 22:05:08,816 [INFO] [spyder.app.mainwindow] -> Loading Application...
2021-08-28 22:05:08,860 [INFO] [spyder.app.mainwindow] -> Loading application...
2021-08-28 22:05:08,861 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for application...
2021-08-28 22:05:08,874 [INFO] [spyder.app.mainwindow] -> Loading Breakpoints...
2021-08-28 22:05:08,879 [INFO] [spyder.app.mainwindow] -> Loading breakpoints...
2021-08-28 22:05:08,889 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for breakpoints...
2021-08-28 22:05:09,480 [INFO] [spyder.app.mainwindow] -> Loading Completion and linting...
2021-08-28 22:05:09,484 [INFO] [spyder.app.mainwindow] -> Loading completions...
2021-08-28 22:05:09,484 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for completions...
2021-08-28 22:05:09,511 [INFO] [spyder.app.mainwindow] -> Loading Files...
2021-08-28 22:05:09,535 [INFO] [spyder.app.mainwindow] -> Loading explorer...
2021-08-28 22:05:09,551 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for explorer...
2021-08-28 22:05:09,583 [INFO] [spyder.app.mainwindow] -> Loading Find...
2021-08-28 22:05:09,587 [INFO] [spyder.app.mainwindow] -> Loading find_in_files...
2021-08-28 22:05:09,610 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for find_in_files...
2021-08-28 22:05:09,799 [INFO] [spyder.app.mainwindow] -> Loading Help...
2021-08-28 22:05:09,805 [INFO] [spyder.app.mainwindow] -> Loading help...
2021-08-28 22:05:09,852 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for help...
2021-08-28 22:05:09,909 [INFO] [spyder.app.mainwindow] -> Loading History...
2021-08-28 22:05:09,915 [INFO] [spyder.app.mainwindow] -> Loading historylog...
2021-08-28 22:05:09,932 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for historylog...
2021-08-28 22:05:09,935 [INFO] [spyder.plugins.console.widgets.main_widget] -> Initializing...
2021-08-28 22:05:10,011 [INFO] [spyder.app.mainwindow] -> Loading Internal console...
2021-08-28 22:05:10,015 [INFO] [spyder.app.mainwindow] -> Loading internal_console...
2021-08-28 22:05:10,031 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for internal_console...
2021-08-28 22:05:10,034 [INFO] [spyder.app.mainwindow] -> Loading Layout...
2021-08-28 22:05:10,036 [INFO] [spyder.app.mainwindow] -> Loading layout...
2021-08-28 22:05:10,036 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for layout...
2021-08-28 22:05:10,055 [INFO] [spyder.app.mainwindow] -> Loading Python interpreter...
2021-08-28 22:05:10,062 [INFO] [spyder.app.mainwindow] -> Loading main_interpreter...
2021-08-28 22:05:10,062 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for main_interpreter...
2021-08-28 22:05:10,083 [INFO] [spyder.app.mainwindow] -> Loading Main menus...
2021-08-28 22:05:10,094 [INFO] [spyder.app.mainwindow] -> Loading mainmenu...
2021-08-28 22:05:10,095 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for mainmenu...
2021-08-28 22:05:10,129 [INFO] [spyder.app.mainwindow] -> Loading Online help...
2021-08-28 22:05:10,134 [INFO] [spyder.app.mainwindow] -> Loading onlinehelp...
2021-08-28 22:05:10,157 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for onlinehelp...
2021-08-28 22:05:10,235 [INFO] [spyder.app.mainwindow] -> Loading Outline Explorer...
2021-08-28 22:05:10,240 [INFO] [spyder.app.mainwindow] -> Loading outline_explorer...
2021-08-28 22:05:10,252 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for outline_explorer...
2021-08-28 22:05:10,266 [INFO] [spyder.app.mainwindow] -> Loading Plots...
2021-08-28 22:05:10,270 [INFO] [spyder.app.mainwindow] -> Loading plots...
2021-08-28 22:05:10,281 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for plots...
2021-08-28 22:05:10,283 [INFO] [spyder.app.mainwindow] -> Loading Preferences...
2021-08-28 22:05:10,285 [INFO] [spyder.app.mainwindow] -> Loading preferences...
2021-08-28 22:05:10,285 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for preferences...
2021-08-28 22:05:10,521 [INFO] [spyder.app.mainwindow] -> Loading Profiler...
2021-08-28 22:05:10,527 [INFO] [spyder.app.mainwindow] -> Loading profiler...
2021-08-28 22:05:10,542 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for profiler...
2021-08-28 22:05:10,563 [INFO] [spyder.app.mainwindow] -> Loading Project...
2021-08-28 22:05:10,569 [INFO] [spyder.app.mainwindow] -> Loading project_explorer...
2021-08-28 22:05:10,581 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for project_explorer...
2021-08-28 22:05:10,598 [INFO] [spyder.app.mainwindow] -> Loading Code Analysis...
2021-08-28 22:05:10,603 [INFO] [spyder.app.mainwindow] -> Loading pylint...
2021-08-28 22:05:10,618 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for pylint...
2021-08-28 22:05:10,619 [INFO] [spyder.app.mainwindow] -> Loading Run...
2021-08-28 22:05:10,621 [INFO] [spyder.app.mainwindow] -> Loading run...
2021-08-28 22:05:10,621 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for run...
2021-08-28 22:05:10,622 [INFO] [spyder.app.mainwindow] -> Loading Keyboard shortcuts...
2021-08-28 22:05:10,623 [INFO] [spyder.app.mainwindow] -> Loading shortcuts...
2021-08-28 22:05:10,623 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for shortcuts...
2021-08-28 22:05:10,633 [INFO] [spyder.app.mainwindow] -> Loading Status bar...
2021-08-28 22:05:10,635 [INFO] [spyder.app.mainwindow] -> Loading statusbar...
2021-08-28 22:05:10,635 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for statusbar...
2021-08-28 22:05:10,651 [INFO] [spyder.app.mainwindow] -> Loading Toolbar...
2021-08-28 22:05:10,655 [INFO] [spyder.app.mainwindow] -> Loading toolbar...
2021-08-28 22:05:10,655 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for toolbar...
2021-08-28 22:05:10,665 [INFO] [spyder.app.mainwindow] -> Loading Interactive tours...
2021-08-28 22:05:10,669 [INFO] [spyder.app.mainwindow] -> Loading tours...
2021-08-28 22:05:10,669 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for tours...
2021-08-28 22:05:10,684 [INFO] [spyder.app.mainwindow] -> Loading Variable explorer...
2021-08-28 22:05:10,688 [INFO] [spyder.app.mainwindow] -> Loading variable_explorer...
2021-08-28 22:05:10,698 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for variable_explorer...
2021-08-28 22:05:10,756 [INFO] [spyder.app.mainwindow] -> Loading Current working directory...
2021-08-28 22:05:10,834 [INFO] [spyder.app.mainwindow] -> Loading workingdir...
2021-08-28 22:05:10,835 [INFO] [spyder.app.mainwindow] -> Registering shortcuts for workingdir...
2021-08-28 22:05:11,156 [INFO] [spyder.app.mainwindow] -> Loading old third-party plugins...
2021-08-28 22:05:11,181 [INFO] [spyder.app.mainwindow] -> Creating Menus...
2021-08-28 22:05:11,182 [INFO] [spyder.app.mainwindow] -> Creating toolbars...
2021-08-28 22:05:11,182 [INFO] [spyder.app.mainwindow] -> Creating Tools menu...
2021-08-28 22:05:11,182 [INFO] [spyder.app.mainwindow] -> Setting up main window...
2021-08-28 22:05:11,184 [INFO] [spyder.app.mainwindow] -> Setting up window...
2021-08-28 22:05:11,621 [INFO] [spyder.app.mainwindow] -> *** End of MainWindow setup ***
2021-08-28 22:05:12,132 [INFO] [spyder.plugins.ipythonconsole.utils.kernelspec] -> Kernel command: ['/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/MacOS/python', '-m', 'spyder_kernels.console', '-f', '{connection_file}']
Traceback (most recent call last):
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/__boot__.py", line 118, in <module>
    _run()
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/__boot__.py", line 84, in _run
    exec(compile(source, path, "exec"), globals(), globals())
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/Spyder.py", line 3, in <module>
    start.main()
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/app/start.py", line 250, in main
    mainwindow.main(options, args)
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/app/mainwindow.py", line 2073, in main
    mainwindow = create_window(MainWindow, app, splash, options, args)
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/app/utils.py", line 283, in create_window
    main.post_visible_setup()
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/app/mainwindow.py", line 1172, in post_visible_setup
    plugin.on_mainwindow_visible()
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/plugins/mainmenu/plugin.py", line 82, in on_mainwindow_visible
    menu._render()
  File "/Users/rclary/Documents/Python/spyder/installers/macOS/dist/Spyder.app/Contents/Resources/lib/python3.9/spyder/api/widgets/menus.py", line 208, in _render
    section, before_section = next(iter_sections)
StopIteration
2021-08-28 22:05:12.253 Spyder[70229:18057822] Spyder Error

@ccordoba12
Copy link
Member

I think I fixed this in PR #16303. Please check with 5.1.2 (I just released it) and let us know.

@beew
Copy link
Author

beew commented Sep 3, 2021

Hi,

I got these errors

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 211, in _render
    section, before_section = next(iter_sections)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 232, 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:

[('external_section', 'extras_section')]
Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 211, in _render
    section, before_section = next(iter_sections)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 232, 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:

[('pane_section', 'toolbar_section')]

@beew
Copy link
Author

beew commented Sep 5, 2021

still same error as 5.1.2 for 5.1.3

@beew
Copy link
Author

beew commented Sep 15, 2021

Still same errors as above for 5.1.4

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 211, in _render
    section, before_section = next(iter_sections)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 232, 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:

[('external_section', 'extras_section')]
Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 211, in _render
    section, before_section = next(iter_sections)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bernard/opt/python38/lib/python3.8/site-packages/spyder/api/widgets/menus.py", line 232, 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:

[('pane_section', 'toolbar_section')]

@ccordoba12
Copy link
Member

@beew, please stop stating the obvious. While this issue remains open, it means it hasn't been fixed yet.

@ccordoba12 ccordoba12 modified the milestones: v5.2.0, v5.2.1 Sep 28, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.2.1, v5.2.2 Nov 26, 2021
@ccordoba12 ccordoba12 removed this from the v5.2.2 milestone Dec 19, 2021
@ccordoba12 ccordoba12 added this to the v5.3.0 milestone Dec 19, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.3.0, v5.3.1 Jan 30, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.3.1, v5.3.2 Apr 9, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.3.2, v5.3.3 May 4, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.3.3, v5.3.4 Jun 20, 2022
@ccordoba12 ccordoba12 modified the milestones: v5.4.3, v5.4.1 Nov 18, 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