Crash on Trunk

12 views
Skip to first unread message

Carlos Córdoba

unread,
Aug 29, 2011, 12:06:51 AM8/29/11
to spyd...@googlegroups.com
Hi,

I'm getting this traceback while closing Spyder:

Traceback (most recent call last):
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/spyder.py",
line 1156, in closeEvent
if self.closing(True):
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/spyder.py",
line 1180, in closing
if not widget.closing_plugin(cancelable):
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 97, in closing_plugin
self.save_config()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 126, in save_config
self.set_option('expanded_state', self.treewidget.get_expanded_state())
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 625, in get_expanded_state
self.save_expanded_state()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 636, in save_expanded_state
for idx in self.model().persistentIndexList():
AttributeError: 'NoneType' object has no attribute 'persistentIndexList'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/spyder.py",
line 1180, in closing
if not widget.closing_plugin(cancelable):
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 97, in closing_plugin
self.save_config()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 126, in save_config
self.set_option('expanded_state', self.treewidget.get_expanded_state())
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 625, in get_expanded_state
self.save_expanded_state()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 636, in save_expanded_state
for idx in self.model().persistentIndexList():
AttributeError: 'NoneType' object has no attribute 'persistentIndexList'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/spyder.py",
line 1180, in closing
if not widget.closing_plugin(cancelable):
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 97, in closing_plugin
self.save_config()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/plugins/projectexplorer.py",
line 126, in save_config
self.set_option('expanded_state', self.treewidget.get_expanded_state())
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 625, in get_expanded_state
self.save_expanded_state()
File
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/spyderlib/widgets/explorer.py",
line 636, in save_expanded_state
for idx in self.model().persistentIndexList():
AttributeError: 'NoneType' object has no attribute 'persistentIndexList'

Cheers,
Carlos

Pierre Raybaut

unread,
Aug 29, 2011, 3:50:06 AM8/29/11
to spyder
Hi Carlos,

Apparently, the project explorer's tree view has no model which is
very weird (its model should be an instance of
spyderlib.widgets.explorer.ProxyModel).

And is everything seems ok regarding the project explorer's behavior
during runtime?
You may test the following: replace 'self.model()' by
'self.proxymodel' here:
"/home/carlos/.virtualenvs/spyder_trunk/lib/python2.7/site-packages/
spyderlib/widgets/explorer.py",
line 636, in save_expanded_state

-Pierre

Carlos Córdoba

unread,
Aug 29, 2011, 5:45:43 PM8/29/11
to spyd...@googlegroups.com
Hi Pierre,

The problem seems to be generated when you've never used the project
explorer to actually create a workspace. I haven't used the project
explorer until now because I was working on simple scripts, but after
creating a workspace the problem disappeared.

The problem also disappears with the suggestion you gave me, i.e.
changing self.model() to self.proxymodel

Cheers,
Carlos

El 29/08/11 02:50, Pierre Raybaut escribió:

anatoly techtonik

unread,
Aug 30, 2011, 1:06:43 AM8/30/11
to spyd...@googlegroups.com
I've got the same traceback the first time time I've run Spyder from a fresh source checkout, but with Segmentation fault in the end.

Executing Spyder from source checkout
Revision 1538:4e4ccecf9342, Branch: default
01. Patched sys.path with /home/techtonik/p/spyderlib
02. PySide is detected, selecting
03. Imported Spyder 2.1.0dev (Qt 4.7.2 via PySide 1.0.6)
 

Pierre Raybaut

unread,
Aug 30, 2011, 3:14:22 AM8/30/11
to spyd...@googlegroups.com
Ok, I see what it is. When the workspace is not defined, the model is
not installed in Project Explorer's tree view, so the only thing to do
is to check if self.model() is not None before trying to get the
persistent index list.

Fixed in my local repo. I'll push changes soon.

-Pierre

> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>

Pierre Raybaut

unread,
Aug 30, 2011, 3:15:10 AM8/30/11
to spyd...@googlegroups.com
The segfault may be PySide-related. 

-Pierre
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/oFcGXSDk0uEJ.
Reply all
Reply to author
Forward
0 new messages