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.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.61k stars 206 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfa in position 1: invalid start byte #292

Closed Mariusio closed 3 years ago

Mariusio commented 4 years ago

Hi, first of all thanks for this amazing tool. I was able to restore tens of gigs of mbox emails to Gmail without problems. However for some of my mbox files I get the following error message, which seems to be related to non-unicode characters?

I think this issue is related to https://github.com/jay0lee/got-your-back/issues/125 however --action split doesn't solve it and it seems that "Import mailbox to Gmail" is not available anymore. Would be grateful for any help!

Error log #1:

Restoring from 25.56mb file /Users/Marius/***/***/Junk.mbox...
Traceback (most recent call last):
  File "gyb.py", line 2206, in <module>
  File "gyb.py", line 1872, in main
  File "fmbox.py", line 32, in get_header
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfa in position 1: invalid start byte
[6211] Failed to execute script gyb

Error log #2

Restoring from 7.81mb file /Users/Marius/***/***/Inbox.mbox...
 restoring 15 messages (18) - 54.07%
Traceback (most recent call last):
  File "gyb.py", line 2206, in <module>
  File "gyb.py", line 1872, in main
  File "fmbox.py", line 32, in get_header
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 16: invalid start byte
[6116] Failed to execute script gyb

Environment:

Got Your Back 1.39
https://git.io/gyb
Jay Lee - jay0lee@gmail.com
Python 3.8.5 64-bit final
google-api-client 1.10.0
macOS-10.14.6-x86_64-i386-64bit x86_64
Path: /Users/Marius/bin/gyb
OpenSSL 1.1.1g  21 Apr 2020
www.googleapis.com connects using TLSv1.3 TLS_AES_256_GCM_SHA384
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.