Ticket #50 (new defect)

Opened 2 years ago

Last modified 2 years ago

Can't edit backup sets (OS X only?)

Reported by: jhb Assigned to: Andy
Priority: normal Milestone: Stable
Component: backend Version:
Severity: normal Keywords:
Cc:

Description

Nothing happens when I try to edit a backup set and I get the following error:

Traceback (most recent call last):
  File "/sw/lib/python2.4/site-packages/pybackpack/gui.py", line 139, in
on_edit1_activate
    if self.seteditor.set_backupset_to_edit(setid):
  File "/sw/lib/python2.4/site-packages/pybackpack/seteditor.py", line
182, in set_backupset_to_edit
    if len(druidfilelist)==1:
TypeError: len() of unsized object

Adding "print druidfilelist" before line 182 of seteditor.py prints this out above the error:

<gtk.TreeView? object (GtkTreeView?) at 0x309dc38>

Change History

15/04/07 11:19:51 changed by Andy

Strange. As far as I'm aware, len() just calls an object's len() method, and a gtk.TreeView? object should have a len() method. Can you try this before line 182:

print druidfilelist.__len__()

15/04/07 11:21:03 changed by Andy

Sorry, those underlined len's should have been __len__(). Silly bug tracker :)

15/04/07 12:38:33 changed by jhb

Apparently not, because adding this:

        print druidfilelist.__len__()

gives this error:

AttributeError: 'gtk.TreeView' object has no attribute '__len__'

Is that not what you wanted me to add? You said a method, and it says attribute - is that important?

16/04/07 09:45:29 changed by jhb

For what it's worth, commenting out a few lines in the problematic section allows me to get to the edit wizard:

#        if len(druidfilelist)==1:                                                                                                   
        self.widgets.get_widget('druidfilelist_label').set_text("1 item")
#        else:                                                                                                                       
#            self.widgets.get_widget('druidfilelist_label').set_text("%d items"%len(druidfilelist))  

I don't really understand what those lines are supposed to do - it's not like I can select multiple items anyway, right?