GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.

Home Page:https://github.com/GAM-team/got-your-back/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to execute script 'gyb' due to unhandled exception!

quack79 opened this issue · comments

Please confirm the following:

Full steps to reproduce the issue:
Backed up mail from gmail.com, trying to restore into a GSuite Legacy account - no issues
Using the command:

gyb --email me@mydomain.com --action restore --local-folder GYB-GMail-Backup-xxx@gmail.com --label-restored "Restore"

Expected outcome (what are you trying to do?):
Mail is restored

Actual outcome (what errors or bad behavior do you see instead?):
Using backup folder GYB-GMail-Backup-xxx@gmail.com
Traceback (most recent call last):
File "gyb.py", line 2817, in
File "gyb.py", line 2254, in main
File "gyb.py", line 1990, in convert_timestamp
File "_strptime.py", line 555, in _strptime_datetime
File "_strptime.py", line 336, in _strptime
ValueError: unconverted data remains: .156000
[40044] Failed to execute script 'gyb' due to unhandled exception!

After some testing with the python source, and adding in a print(val) to see what it was actually falling over on, I have found a few dates written into the database that it cannot process.

For example:
2013-03-24 17:34:40.756000
2013-03-24 17:34:40.481000

I am now using DB Browser for SQLite to edit the date fields and will try running the code again.

Edit: It is now restoring my email. So manually fixing the database worked.

I came across exactly the same issue. Thanks @quack79 for poining me to the manual edit route so that I can continue for now.

Manual edit worked great. Thanks @quack79