0

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
Community
  • 1
  • 1
strpeter
  • 2,562
  • 3
  • 27
  • 48
  • Do your PATH or PYTHONPATH or (god forbid!) PYTHONHOME environment variables, or `HK**\Software\Python\PythonCore\2.7` registry entries, contain any references to any Python distribution? (Wondering about inter-distribution conflicts, although this seems unlikely given that you've checked on multiple computers). – Jonathan March Dec 01 '16 at 16:30
  • Could you be so kind as to file a "feedback / bug" report from the Canopy help menu after reproducing this in Canopy? Or is this in EPD? (which version)? Thanks. – Jonathan March Dec 01 '16 at 16:41
  • @JonathanMarch: It's the free version (I think Canopy) since I was just testing with alternatives. Since it did not work, I uninstalled it. But let's give it another try... – strpeter Dec 01 '16 at 17:09
  • Initially I just had Python(x,y) installed without any other distribution. When the spyder IDE broke, I removed this one properly and installed Canopy. So I conclude that there is no inter-distribution conflict. Python(x,y) is used together with the variable "PATH" as `C:\Python27` etc. – strpeter Dec 01 '16 at 17:17
  • By the way, the variable PYTHONPATH links to some local packages which should be fine. – strpeter Dec 01 '16 at 17:38
  • What happens if you run `pip uninstall configparser` in PythonXY and try again? – Carlos Cordoba Dec 02 '16 at 00:47
  • @CarlosCordoba: The executable spyder exits/crashes directely after the initialization. – strpeter Dec 02 '16 at 14:21

2 Answers2

1

(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).

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
  • Thank you, this took me a lot of time to understand that issue. Can you give me some details about the problem with the `xy` module in `app/mainwindow.py`? – strpeter Dec 02 '16 at 12:57
  • `xy` is used to create some menu entries in Spyder's Help menu (that point to Scipy, Numpy docs distributed with PythonXY). The error you get seems to be generated because the `xy.userconfig` module has not been updated to work with the latest version of version of `confiparser` in PyPi. Since at this moment PythonXY development seems stalled, and this is a serious error for people using it along with Spyder, I instructed one of our junior developers to remove the use of `xy` in Spyder (to fix this problem in our side). – Carlos Cordoba Dec 02 '16 at 16:13
0

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?

Jonathan March
  • 5,800
  • 2
  • 14
  • 16