Certian gmail label names produce errors during backup

Bug #812968 reported by Charlie Pearce on 2011-07-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Miguel Ángel Molina

Bug Description

For example If I have a label "Archive Folders/Sent Items" (without the quotes) the backup fails with the following error:

Error: invalid literal for int() with base 10: '[NONEXISTENT] Unknown Mailbox: Archive Folders (now in authenticated state) (Failure)'

If I change this label to "Archive Folders-Sent Items" (without quotes) then the backup continues ok.

Changed in gibareto:
assignee: nobody → Miguel Ángel Molina (sslapp)
importance: Undecided → Medium
status: New → In Progress
Miguel Ángel Molina (sslapp) wrote :

Hi Charlie!

Thank you for your bug report.

I need to add in Gibareto's documentation this tag problem.

The internal folder names that GMail uses with IMAP contains the "/" character and Gibareto needs to remove it in order to get the right folder name, so the tags can't include the "/" character and my recommendation is to avoid any non alphanumeric character in tag names.

Please, rename your folders (tags) and make a backup. Your feedback will be welcome.


Charlie Pearce (cosmicvibes) wrote :

Hi Miguel!

Thanks for looking at this. First up I'd like say many thanks for writing this app, I've been looking for a gmail backup solution for a while, and this makes it nice and simple.

I can certainly rename the tags for the time being. I'm currently using this with my personal accounts so this is not hard to do. But in the future I'll be looking at using this at work where I maintain the accounts for around a dozen users. It will be a lot harder to ensure they don't use non alphanumeric character in tag names, though I will try. I imagine though that on a much larger scale, this would not be feasible - so long-term if there is a workaround, it'd be good to see.

I do have a few other suggestions from the perspective of using this with multiple users - please let me know where best to post them, or if in fact you have enough going on already - I don't wish to overwhelm you!

You'll also notice that I made another bug report on a different matter- if you need any more information on anything -or for me to test anything- then just say, I'm well versed on the command line and although not a python programmer I have worked in other languages - so don't be afraid to get technical!

Changed in gibareto:
milestone: none → gibareto-0.3
status: In Progress → Fix Committed
Miguel Ángel Molina (sslapp) wrote :

I've commited a fix to this issue that "seems" to work.

Now gibareto handles nested tags and tags with the "/" character in its name.
Due to the limitation (by the S.O.) to create directories whose name contains the "/" character, this char is replaced by "+", so, the folder "this/is/a/folder" is saved as "this+is+a+folder".

Download the file gb_imap.py at revision 15 and give it a try.

Thank you.

Miguel Ángel Molina (sslapp) wrote :

To make suggestions to this project open a new bug report and select "whislist" in importance field.

Thank you for your help to improve gibareto ;-)

Charlie Pearce (cosmicvibes) wrote :

Fantastic! I reverted back the problem labels to include the "/" and just to be sure I first ran it without updating to the new code - and as expected the backup failed. I then updated gb_imap.py and ran the backup again and it now works perfectly.

Many thanks for the speedy update. I'll post a few suggestions to the "wishlist" as you have suggested in the next day or too. I'll keep you updated with any issues as I continue to backup more accounts, but with this fix in place it looks like it'll be fine for them too.

Thanks again!

Changed in gibareto:
milestone: gibareto-0.3 → gibareto-0.4
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers