[Solved]: spyder: IndexError: list index out of range

When I am hitting spyder from CMD or from Anaconda Navigator i am getting this ERROR

$ spyderTraceback (most recent call last):  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3181, in main    mainwindow = run_spyder(app, options, args)  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3057, in run_spyder    main.setup()  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 795, in setup    message=_("Spyder Internal Consolenn"  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/plugins/console.py", line 67, in __init__    light_background=light_background)  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/widgets/internalshell.py", line 142, in __init__    profile)  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/widgets/shell.py", line 636, in __init__    initial_message)  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/widgets/shell.py", line 70, in __init__    self.history = self.load_history()  File "/Users/admin/anaconda3/lib/python3.7/site-packages/spyder/widgets/shell.py", line 495, in load_history    if rawhistory[1] != self.INITHISTORY[1]:IndexError: list index out of range

Solution: Reset spyder from CMD. Hope it will work.

$ spyder --reset*** Reset Spyder settings to defaults ***removing: /Users/admin/.spyder-py3/onlinehelpremoving: /Users/admin/.spyder-py3/spyder.iniremoving: /Users/admin/.spyder-py3/temp.pyremoving: /Users/admin/.spyder-py3/template.pyremoving: /Users/admin/.spyder-py3/history.pyremoving: /Users/admin/.spyder-py3/history_internal.pyremoving: /Users/admin/.spyder-py3/workingdirremoving: /Users/admin/.spyder-py3/.ropeprojectremoving: /Users/admin/.spyder-py3/langconfigremoving: /Users/admin/.spyder-py3/spyder.lock