Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when restoring mail #24

Closed
pfsung opened this issue May 9, 2012 · 15 comments
Closed

error when restoring mail #24

pfsung opened this issue May 9, 2012 · 15 comments
Assignees

Comments

@pfsung
Copy link

pfsung commented May 9, 2012

using windows gmvault 1.0beta

when restoring mail to another address

I get this error:

Restore email with id 1372317707363560697.
Error 'int' object has no attribute 'split'. For more information see log file

@gaubert
Copy link
Owner

gaubert commented May 9, 2012

Please run it again with the option --debug and send me the logs (there is a gmvault.log file in the dir from where you run the tool). You can instead send me the console output.

@pfsung
Copy link
Author

pfsung commented May 9, 2012

thanks. i just reran restore will debug switch.

btw: i am restoring 20000+ emails. it took 12 hours to get to the error last run.

On May 9, 2012, at 2:47 AM, Guillaume Aubertreply@reply.github.com wrote:

Please run it again with the option --debug and send me the logs (there is a gmvault.log file in the dir from where you run the tool). You can instead send me the console output.


Reply to this email directly or view it on GitHub:
#24 (comment)

@gaubert
Copy link
Owner

gaubert commented May 9, 2012

I forgot to mention it but use the --restart option to restart few seconds (up to 20 emails) where you failed. It should not take 20 hours :-).
You might have a bad email in Gmail (corrupted or not readable). I will write some blog posts about that.
Anyway I would like to catch the error to have something understandable by users.

@ghost ghost assigned gaubert May 9, 2012
@pfsung
Copy link
Author

pfsung commented May 9, 2012

Here's the error with debug switch on:

Restore email with id 1372316080664518749.
Unburied email with id 1372316080664518749.
Created labels [] for email with id 1372316080664518749.
Before to Append
Appended data with flags [u'\Seen'] and internal time 2011-06-22 07:36:39
Pushed email with id 1372316080664518749.
Restore email with id 1372317707363560697.
Unburied email with id 1372317707363560697.
Error 'int' object has no attribute 'split'. For more information see log
file

Traceback (most recent call last):
File "gmv_cmd.py", line 475, in run
File "gmv_cmd.py", line 383, in _restore
File "gmvault.pyc", line 858, in restore
File "imap_utils.pyc", line 377, in create_gmail_labels
File "imap_utils.pyc", line 350, in _get_dir_from_labels
AttributeError: 'int' object has no attribute 'split'

Traceback (most recent call last):
File "gmv_cmd.py", line 475, in run
File "gmv_cmd.py", line 383, in _restore
File "gmvault.pyc", line 858, in restore
File "imap_utils.pyc", line 377, in create_gmail_labels
File "imap_utils.pyc", line 350, in _get_dir_from_labels
AttributeError: 'int' object has no attribute 'split'

@pfsung
Copy link
Author

pfsung commented May 10, 2012

I've observed that:

  • emails that has caused this error contains at least one URL in the messagebody

@gaubert
Copy link
Owner

gaubert commented May 10, 2012

Ok thanks I will check that tonight.

@gaubert
Copy link
Owner

gaubert commented May 10, 2012

It has to do with the label you use. Could you please send me via email (guillaume((dot))aubert((at))gmail((dot))com)
the file 1372317707363560697.meta. I would like to check its content.
There is no confidential info in it (no worries).

Thanks

@pfsung
Copy link
Author

pfsung commented May 10, 2012

{"thread_ids": 1372317707363560697, "msg_id": null, "flags": ["\Seen"], "gm_id": 1372317707363560697, "internal_date": 1308729751, "labels": [0, "\Sent"], "subject": null}

@gaubert
Copy link
Owner

gaubert commented May 10, 2012

You should not have a 0 in labels. Could you let me know what are the original labels.
I will recreate a test with your configuration.

@pfsung
Copy link
Author

pfsung commented May 10, 2012

I have a label called "00000"

@pfsung
Copy link
Author

pfsung commented May 10, 2012

that's where the message should be restored to be it errors

@gaubert
Copy link
Owner

gaubert commented May 10, 2012

You have "00000" in addition to the Sent label ?
I will add that in my test and see why Gmvault stores a 0 (the int number) and not a string. This is probably what I get from the imaplib. I will let you know, thanks for the help.

@pfsung
Copy link
Author

pfsung commented May 10, 2012

Yes, it is a message I sent to myself (as a reminder) then I flag it with a "00000" label. The "00000" label is sorted to the top, that is why I have it.

@gaubert
Copy link
Owner

gaubert commented May 10, 2012

I have reproduced the error and when you use a number as label, imap return me the number. So for you it is 0.
Cool :-(. I need to understand if it is Gmail IMAP or the python lib that does this.
In the mean time I could add a quick fix. If it is a number convert it as a string. So your restored label would be "0" instead of "0000".
It isn't fully satisfying but I might not be able to do better than that.

@pfsung
Copy link
Author

pfsung commented May 10, 2012

I've already global searched and replace the 0 to a string and did a successful full restore. thanks for the efforts and hard work.. Awaiting for the next version.

@gaubert gaubert closed this as completed May 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants