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 from MBOX file #426

Open
AnandJhaveri opened this issue Jun 7, 2023 · 2 comments
Open

Error when restoring from MBOX file #426

AnandJhaveri opened this issue Jun 7, 2023 · 2 comments

Comments

@AnandJhaveri
Copy link

Full steps to reproduce the issue:

  1. Use Google Takeout to backup file from my old email id
  2. Use GYB to restore mbox file

Here's the command line:

C:\GYB> gyb --email anand.jhaveri100@gmail.com --action restore-mbox --local-folder "C:\Users\anand\Downloads\googledata\Takeout\Mail"

Using backup folder C:\Users\anand\Downloads\googledata\Takeout\Mail

Restoring from 18.74gb file C:\Users\anand\Downloads\googledata\Takeout\Mail\All mail Including Spam and Trash.mbox...

Expected outcome (what are you trying to do?):
I am expecting to restore old emails downloaded via Google Takeout into my new email id

Actual outcome (what errors or bad behavior do you see instead?):
Traceback (most recent call last):%
File "gyb.py", line 2767, in
File "gyb.py", line 2486, in main
File "gyb.py", line 749, in callGAPI
File "googleapiclient_helpers.py", line 130, in positional_wrapper
File "googleapiclient\http.py", line 1604, in execute
File "gyb.py", line 1696, in restored_message
sqlite3.IntegrityError: datatype mismatch
[12844] Failed to execute script 'gyb' due to unhandled exception!

Please help to resolve. Thanks.

Regards,
Anand.

@fabianocastello
Copy link

+1 to the issue.

Using:
C:\GYB>gyb --email xxxx@xxxx.usp.br --action restore-mbox --label-restored 202306 --memory-limit 1000000 --local-folder "c:\GYB\base"

Restoring from 26.26gb file c:\GYB\base\All mail Including Spam and Trash-011.mbox...
Traceback (most recent call last):%
File "gyb.py", line 2767, in
File "gyb.py", line 2486, in main
File "gyb.py", line 749, in callGAPI
File "googleapiclient_helpers.py", line 130, in positional_wrapper
File "googleapiclient\http.py", line 1604, in execute
File "gyb.py", line 1696, in restored_message
sqlite3.IntegrityError: datatype mismatch
[17420] Failed to execute script 'gyb' due to unhandled exception!

IMPORTANT: I am restoring mbox file exported by google takeout from my personal account. Accoring to docs this is possible.

I know that python is running in backgroud. Could be something related to package versions?

@Huang-CL
Copy link

Huang-CL commented Jul 5, 2023

This procedure solved my problem

It looks like you are using a regular GYB backup folder to restore mbox files. Can you create an empty folder, place just the mbox files there and try again?
ref: #269 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants