Ticket #50 (new defect)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: jhb Owned by: 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

Changed 5 years ago 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__()

Changed 5 years ago by Andy

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

Changed 5 years ago 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?

Changed 5 years ago 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?

Note: See TracTickets for help on using tickets.