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

IndexError when reading Internal console history file #19850

Closed
Farah9494 opened this issue Oct 16, 2022 · 1 comment
Closed

IndexError when reading Internal console history file #19850

Farah9494 opened this issue Oct 16, 2022 · 1 comment

Comments

@Farah9494
Copy link

I have tried : conda install -f python.app and I still get the same following error message when I try to launch Spyder
Traceback (most recent call last):
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/utils.py", line 281, in create_window
main.setup()
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 875, in setup
PLUGIN_REGISTRY.register_plugin(self, PluginClass,
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/api/plugin_registration/registry.py", line 274, in register_plugin
instance = self._instantiate_spyder5_plugin(
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/api/plugin_registration/registry.py", line 152, in _instantiate_spyder5_plugin
plugin_instance = PluginClass(main_window, configuration=CONF)
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/api/plugins/new_api.py", line 890, in init
super().init(parent, configuration=configuration)
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/api/plugins/new_api.py", line 294, in init
self._container = container = self.CONTAINER_CLASS(
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/console/widgets/main_widget.py", line 123, in init
self.shell = InternalShell( # TODO: Move to use SpyderWidgetMixin?
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/console/widgets/internalshell.py", line 153, in init
super().init(parent, get_conf_path('history_internal.py'),
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/console/widgets/shell.py", line 665, in init
ShellBaseWidget.init(self, parent, history_filename,
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/console/widgets/shell.py", line 75, in init
self.history = self.load_history()
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/console/widgets/shell.py", line 503, in load_history
if rawhistory[1] != self.INITHISTORY[1]:
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/farah/opt/anaconda3/bin/spyder", line 11, in
sys.exit(main())
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py", line 237, in main
mainwindow.main(options, args)
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1992, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/utils.py", line 283, in create_window
if main.console is not None:
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1088, in getattr
return self.get_plugin(self._INTERNAL_PLUGINS_MAPPING[attr])
File "/Users/farah/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 165, in get_plugin
raise SpyderAPIError(f'Plugin "{plugin_name}" not found!')
spyder.api.exceptions.SpyderAPIError: Plugin "internal_console" not found!

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 16, 2022

Hey @Farah9494, thanks for reporting. Please open a terminal and run

spyder --reset

then start Spyder again. That should do the trick.

However, we'll fix this bug in our next version (5.4.0), to be released in a couple of weeks, so other users don't encounter it.

@ccordoba12 ccordoba12 changed the title SPYDER won't launch from Anaconda on Mac IndexError when reading Internal console history file Oct 16, 2022
@ccordoba12 ccordoba12 self-assigned this Oct 16, 2022
@ccordoba12 ccordoba12 added this to the v5.4.0 milestone Oct 16, 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

2 participants