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

Spyder crashes on launch trying to load the project config file (.spyderproject) #1845

Closed
spyder-bot opened this issue Feb 17, 2015 · 5 comments · Fixed by #2233
Closed

Spyder crashes on launch trying to load the project config file (.spyderproject) #1845

spyder-bot opened this issue Feb 17, 2015 · 5 comments · Fixed by #2233

Comments

@spyder-bot
Copy link
Collaborator

From khe...@gmail.com on 2014-06-07T15:55:52Z

Spyder Version: 2.2.5
Python Version: 2.7.6
Qt Version : 4.8.6, PyQt4 (API v2) 4.10.4 on Linux
IPython >=0.13 : 1.2.1 (OK)
matplotlib >=1.0: 1.3.1 (OK)
pep8 >=0.6 : 1.4.6 (OK)
pyflakes >=0.5.0: 0.8.1 (OK)
pylint >=0.25 : 1.1.0 (OK)
rope >=0.9.2 : 0.9.2 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
sympy >=0.7.0 : 0.7.4.1 (OK)

What steps will reproduce the problem?

  1. Set a workspace in the project explorer.
    1. Import an existing directory in the project explorer.
    2. Close spyder
    3. Open spyder

What is the expected output?
Normal spyder execution.

What do you see instead?
Crashes on launch generating the spyder_crash.log file with:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2152, in main
mainwindow = run_spyder(app, options, args)
File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2047, in run_spyder
main.setup()
File "/usr/lib/python2.7/dist-packages/spyderlib/spyder.py", line 793, in setup
self.projectexplorer = ProjectExplorer(self)
File "/usr/lib/python2.7/dist-packages/spyderlib/plugins/projectexplorer.py", line 37, in init
self.load_config()
File "/usr/lib/python2.7/dist-packages/spyderlib/plugins/projectexplorer.py", line 137, in load_config
self.set_workspace(self.get_option('workspace', None))
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 1296, in set_workspace
self.treewidget.set_workspace(path)
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 696, in set_workspace
self.workspace.set_root_path(root_path)
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 278, in set_root_path
self.load()
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 307, in load
setattr(self, attr, data[attr])
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 257, in _set_project_paths
self.add_project(root_path)
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 382, in add_project
project.set_root_path(root_path)
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 86, in set_root_path
self.load()
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/projectexplorer.py", line 125, in load
data = cPickle.loads(fdesc.read())
AttributeError: 'dict' object has no attribute 'append'

Please provide any additional information below

. I got the same issue in this system:
Spyder Version: 2.2.5
Python Version: 2.7.7
Qt Version : 4.8.5, PyQt4 (API v1) 4.10.4 on Windows
IPython >=0.13 : None (NOK)
matplotlib >=1.0: None (NOK)
pep8 >=0.6 : None (NOK)
pyflakes >=0.5.0: None (OK)
pylint >=0.25 : None (NOK)
rope >=0.9.2 : 0.9.4 (OK)
sphinx >=0.6.6 : None (NOK)

I managed to fix the error by adding the AttributeError exception in the 'except' sentence. I don't know if this is the right way to solve the problem, anyway a patch is attached.

Attachment: spyder_projectexplorer_attributeerror.patch

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1845

@spyder-bot spyder-bot added this to the v2.3.4 milestone Feb 17, 2015
@spyder-bot
Copy link
Collaborator Author

From bba...@gmail.com on 2014-06-11T06:19:59Z

I'm having the same exact problem. Your patch works, but only if I open Spyder on the command line.

Here's my system info:

OS: Mac OS 10.9.3
Hardware: Mac Pro (Late 2013)
Spyder Version: 2.2.5
Python Version: 2.7.6
Qt Version : 4.8.6
IPython >=0.13 : 1.2.1 (OK)
matplotlib >=1.0: 1.3.1 (OK)
pep8 >=0.6 : 1.4.6 (OK)
pyflakes >=0.5.0: 0.8.1 (OK)
pylint >=0.25 : 1.1.0 (OK)
rope >=0.9.2 : 0.9.2 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
sympy >=0.7.0 : 0.7.4.1 (OK)

@spyder-bot
Copy link
Collaborator Author

From vasaf...@gmail.com on 2014-12-30T11:05:16Z

Exactly what i've got.

@spyder-bot
Copy link
Collaborator Author

From rafi.ku...@gmail.com on 2015-01-20T02:10:48Z

I have the same issue, on two different machines (different hardware, same os)

I have a workspace with several projects, it looks like an error while loading all the .spyderproject files.

The funny part is: only one of these project files looks broken. If I delete that particular file (I attached it if it helps), spyder starts up fine (reporting the error from the last attempt but otherwise starting up fine), but it recreates it and failes again on the next startup.

Note (probably not important): my workspace lives in a folder thats symlinked into /home/user

sys config:

OS: Debian 8.0 Jessie (testing)
Linux laptop 3.16-2-amd64 #1 SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux

Spyder Version: 2.3.2
Python Version: 2.7.8
Qt Version : 4.8.6, PyQt4 (API v2) 4.11.2 on Linux
pyflakes >=0.5.0: None (NOK)
pep8 >=0.6 : None (NOK)
IPython >=0.13 : 2.3.1 (OK)
zmq >=2.1.11 : 14.4.1 (OK)
pygments >=1.6 : 2.0.1 (OK)
pandas >=0.13.1 : None (NOK)
sphinx >=0.6.6 : 1.3b2 (OK)
psutil >=0.3 : None (NOK)
rope >=0.9.2 : 0.10.2 (OK)
matplotlib >=1.0: 1.4.2 (OK)
sympy >=0.7.0 : None (NOK)
pylint >=0.25 : 1.4.0 (OK)

Attachment: .spyderproject.bkup

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-30T14:00:58Z

Labels: MS-v2.3.4

@RafiKueng
Copy link

comment to get updates, I'm one of the reporters of this bug (two msgs up)
I'm here for further questions..

@goanpeca goanpeca self-assigned this Feb 26, 2015
@ccordoba12 ccordoba12 modified the milestones: v2.4, v2.3.4 Mar 7, 2015
@ccordoba12 ccordoba12 modified the milestones: v2.3.4, v2.4 Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants