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

Project Explorer does not load all projects in workspace. #1489

Closed
spyder-bot opened this issue Feb 17, 2015 · 4 comments
Closed

Project Explorer does not load all projects in workspace. #1489

spyder-bot opened this issue Feb 17, 2015 · 4 comments

Comments

@spyder-bot
Copy link
Collaborator

From antoine....@gmail.com on 2013-07-19T05:05:14Z

Spyder Version: 2.2.1
Python Version: 2.7.3
Qt Version: 4.8.4, PyQt4 (API v2) 4.9.6 on Windows

What steps will reproduce the problem?

  1. Make a workspace with many project
    1. Close spyder.
    2. Re-open spyder.

Some of the project in my workspace have disapeard. I found a log in one of my project, maybe relevant:

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 2094, in main
mainwindow = run_spyder(app, options, args)
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 1989, in run_spyder
main.setup()
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 773, in setup
self.projectexplorer = ProjectExplorer(self)
File "C:\Python27\lib\site-packages\spyderlib\plugins\projectexplorer.py", line 36, in init
self.load_config()
File "C:\Python27\lib\site-packages\spyderlib\plugins\projectexplorer.py", line 136, in load_config
self.set_workspace(self.get_option('workspace', None))
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 1265, in set_workspace
self.treewidget.set_workspace(path)
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 669, in set_workspace
self.workspace.set_root_path(root_path)
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 277, in set_root_path
self.load()
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 306, in load
setattr(self, attr, data[attr])
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 256, in _set_project_paths
self.add_project(root_path)
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 381, in add_project
project.set_root_path(root_path)
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 85, in set_root_path
self.load()
File "C:\Python27\lib\site-packages\spyderlib\widgets\projectexplorer.py", line 124, in load
data = cPickle.loads(fdesc.read())
TypeError: ("'str' object is not callable", 'related_projects', ([], 'relative_pythonpath', [u'lib'], 'name', u'TestFramew'))

I have tried to check the .spyderworkspace and .spyderproject using IPython and pickle.

In [6]: f = open('.spyderworkspace')

In [7]: pickle.load(f)
Out[7]:
{'name': u'spyder_workspace',
'project_paths': [u'DMS-RegresionTests',
u'signalDAQ',
u'LogLogger',
u'regExpert']}

and

In [13]: with open('.spyderproject') as f:
...: data = pickle.load(f)
...:

In [14]: data
Out[14]:
{'name': u'TestFramework',
'opened': True,
'related_projects': [],
'relative_pythonpath': [u'lib']}

This seems correct to me

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

@spyder-bot
Copy link
Collaborator Author

From antoine....@gmail.com on 2013-07-19T07:34:37Z

I found a fix:
projectexplorer.py : Line 125:

  • except cPickle.PickleError:
  • except TypeError, cPickle.PickleError:

Then it's fine !

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-09-04T12:04:05Z

Ok, thanks for reporting and for the fix! I'll add it to our next release.

Labels: -MS-v2.2 MS-v2.2.4

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-09-04T13:53:53Z

Summary: Project Explorer does not load all projects in workspace. (was: Project Explorer does not load all projet in workspace.)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-09-04T15:22:51Z

This issue was updated by revision dcff9df72f0c .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant