Backup stops with error "Error: local variable 'size' referenced before assignment"

Bug #813396 reported by Charlie Pearce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gibareto
Fix Committed
High
Miguel Ángel Molina

Bug Description

I am backing up a mid-sized gmail account (around 2.7GB). After a while it stops with the error:

Error: local variable 'size' referenced before assignment

This kept happening, meaning that I had to manually restart the process several times. Bit of pain as I plan to backup many large email accounts.

Changed in gibareto:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Miguel Ángel Molina (sslapp)
Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Hi Charlie!

I can't reproduce this error.

Could you make the change below into the gb_imap.py file and tell me if the error persists?

Open the gb_imap.py file with a text editor.

The lines 197-198 looks like:
197 getsize = re_size.search(rest)
198 if getsize:

Insert the line:
size = 0
between those lines, respect the identation:

  getsize = re_size.search(rest)
        size = 0
  if getsize:

Save the file and perform a backup.

Thank you.

Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Sorry, the lines indentation are wrong in my last post.
All of the three lines must start in the same column:

  getsize = re_size.search(rest)
  size = 0
  if getsize:

Revision history for this message
Charlie Pearce (cosmicvibes) wrote :

I've made the change, and am running a backup now. As it's quite a large backup it might take a while, so I'll update on you with the result later today.

Revision history for this message
Charlie Pearce (cosmicvibes) wrote :

Apologies for the later than expected reply, I've been very busy at work. It took into the night complete (large backup, and not the fastest connection!) but it did so in one hit, So that seems to have fixed it.

For reference do you need any more info on my system? I'm running an up-to-date version of Opensuse 11.4 with Python 2.7.

Revision history for this message
Miguel Ángel Molina (sslapp) wrote :

Thank you for your feedback.

Which version of gibareto are you running?
do you use the gui or command line?

Regards

Changed in gibareto:
status: In Progress → Fix Committed
milestone: none → gibareto-0.3
Revision history for this message
Charlie Pearce (cosmicvibes) wrote :

Hi, I was using 0.3 and obviously have now applied the changes you have suggested. I'm working exclusively on the command line, as this is running on a headless server!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.