strpeter
strpeter

Reputation: 2774

Configparser error leads to crash of Spyder 3 under Python(x,y)

During its startup, Spyder3 IDE crashes under Python(x,y). I have installed a Python(x,y) distribution (2.7.10.0) of Python2.7 under Windows 7 and after updating the package spyder to the most recent version (with pip: V3.0.x), it does not restart anymore. Resetting the spyder config does not help.

It is reproducible as I checked it on 3 computers and also with the Enthought distribution, it has the same problem. Only under Anaconda, it keeps working properly.

The error message is stored in the contents of file spyder_crash.log:

Traceback (most recent call last):
  File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 3001, in main
    mainwindow = run_spyder(app, options, args)
  File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 2905, in run_spyder
    main.setup()
  File "c:\python27\lib\site-packages\spyder\app\mainwindow.py", line 1010, in setup
    from xy.config import DOC_PATH as xy_doc_path
  File "c:\python27\lib\site-packages\xy\config.py", line 40, in <module>
    CONF = UserConfig('xy', defaults=DEFAULTS, version=__version__, subfolder='.xy')
  File "c:\python27\lib\site-packages\xy\userconfig.py", line 110, in __init__
    if version != self.get_version(version):
  File "c:\python27\lib\site-packages\xy\userconfig.py", line 130, in get_version
    return self.get(self.DEFAULT_SECTION_NAME, 'version', version)
  File "c:\python27\lib\site-packages\xy\userconfig.py", line 269, in get
    value = cp.ConfigParser.get(self, section, option, raw=self.raw)
  File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 811, in get
    d)
  File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 384, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "c:\python27\lib\site-packages\backports\configparser\__init__.py", line 397, in _interpolate_some
    rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'

PS: I see that I could post an issue directly on Github but there are over 600 issues open. Maybe there is someone who knows a fix directly.

Different causes that Spyder crashes:

Edit:

Installation details:

C:\Users\strpeter>pip install spyder
Successfully installed configparser-3.5.0 jupyter-core-4.2.1 nbformat-4.2.0
  setuptools-30.0.0 spyder-3.0.2

When uninstalling configparser, as recommended in the comment below, pythonw.exe stops working during the initialization of spyder3. I have no details at hand to report about the crash.

C:\Users\strpeter>pip uninstall configparser
Uninstalling configparser-3.5.0:
  c:\python27\lib\site-packages\backports\configparser\__init__.py
  c:\python27\lib\site-packages\backports\configparser\__init__.pyc
  c:\python27\lib\site-packages\backports\configparser\helpers.py
  c:\python27\lib\site-packages\backports\configparser\helpers.pyc
  c:\python27\lib\site-packages\configparser-3.5.0-py2.7-nspkg.pth
  c:\python27\lib\site-packages\configparser-3.5.0-py2.7.egg-info
  c:\python27\lib\site-packages\configparser.py
  c:\python27\lib\site-packages\configparser.pyc
Proceed (y/n)? y
  Successfully uninstalled configparser-3.5.0

Upvotes: 0

Views: 357

Answers (2)

Carlos Cordoba
Carlos Cordoba

Reputation: 34156

(Spyder developer here) This is an error between PythonXY and Spyder. I opened an issue about it, which we're going to solve in Spyder 3.1.0 (to be released in mid January/2017).

Upvotes: 1

Jonathan March
Jonathan March

Reputation: 5810

This might be due to incompatibilities due to different Qt wrappers. To test this in Enthought Python, please open a Canopy Command Prompt (or otherwise ensure that Enthought Python is your default python). Then ensure that PyQt is installed and make it the default Qt wrapper:

enpkg pyqt
set QT_API=pyqt

Now does Spyder 3 run ok?

Upvotes: 0

Related Questions