My spyder has worked for month but it has suddenly stopped working.
I have unistalled and re-installed anaconda, it does not work. Interestingly, Spyder works when I install Python 3.4, therefore I think the problem is a conflict between python 2.7 installed on my mac and the one provided by anaconda.
Here is the internal log.
Spyder Internal Console
This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
  spy.app, spy.window, dir(spy)
Please don't use it to run your code
>>> /Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
  """)
Traceback (most recent call last):
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/ipythonconsole.py", line 656, in toggle_view
    self.create_new_client(give_focus=False)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/ipythonconsole.py", line 832, in create_new_client
    self.main.extconsole.start_ipykernel(client, give_focus=give_focus)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 1273, in start_ipykernel
    ipyclient=client, give_ipyclient_focus=give_focus)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 832, in start
    show_elapsed_time=show_elapsed_time)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/pythonshell.py", line 207, in __init__
    show_elapsed_time=show_elapsed_time)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/baseshell.py", line 73, in __init__
    self.shell = self.SHELL_CLASS(parent, get_conf_path(history_filename))
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/pythonshell.py", line 39, in __init__
    PythonShellWidget.__init__(self, parent, history_filename, profile)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 673, in __init__
    ShellBaseWidget.__init__(self, parent, history_filename, profile)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 63, in __init__
    self.history = self.load_history()
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 494, in load_history
    if rawhistory[1] != self.INITHISTORY[1]:
IndexError: list index out of range
Traceback (most recent call last):
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/ipythonconsole.py", line 832, in create_new_client
    self.main.extconsole.start_ipykernel(client, give_focus=give_focus)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 1273, in start_ipykernel
    ipyclient=client, give_ipyclient_focus=give_focus)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 832, in start
    show_elapsed_time=show_elapsed_time)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/pythonshell.py", line 207, in __init__
    show_elapsed_time=show_elapsed_time)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/baseshell.py", line 73, in __init__
    self.shell = self.SHELL_CLASS(parent, get_conf_path(history_filename))
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/pythonshell.py", line 39, in __init__
    PythonShellWidget.__init__(self, parent, history_filename, profile)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 673, in __init__
    ShellBaseWidget.__init__(self, parent, history_filename, profile)
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 63, in __init__
    self.history = self.load_history()
  File "/Users/Jean-Benoit/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/shell.py", line 494, in load_history
    if rawhistory[1] != self.INITHISTORY[1]:
IndexError: list index out of range
Has someone ever faced the same problem ?
A possible cause of this is that your history file somehow got truncated or otherwise corrupted. The history file is called history.py and it is in the spyder configuration directory, which is /Users/Jean-Benoit/.spyder2 or similar. Try removing that file. Alternatively, the command spyder --reset removes all configuration files, including history.py.
Amazing! It works ! Thanks you so much @jitseniesen you made my day ! Just a question, do you think it might be due to a virus or something like that ? It's strange that my history get corrupted / truncated each time I have reinstalled Anaconda.
Just a question, do you think it might be due to a virus or something like that?
Nop, don't worry. It's just that we don't truncate history correctly. We'll try to fix this error in Spyder 3.1 :-)
Closing as a duplicate of issue #3376