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 400: Invalid Label name - InvalidArgument (DRAFTS) #109

Closed
beachlounger opened this issue Jul 28, 2016 · 3 comments
Closed

Error 400: Invalid Label name - InvalidArgument (DRAFTS) #109

beachlounger opened this issue Jul 28, 2016 · 3 comments

Comments

@beachlounger
Copy link

Hi,

In trying to restore a single mbox file to a new gmail account (blank and different from the original). In doing a restore mbox command I am receiving an invalid Label name issue on the 11 message to be imported. Also, it seems from looking at previously closed issues this has happened to others before but supposedly addressed. Please help!

I am running the latest version 0.47 on a windows 10 platform x64. Output below from a debug param including the command used (auth and email masked). Is this an issue with the "DRAFTS" Label?

Note, is there a way to skip errors as a parameter or filter out an restore option with mbox (e.g. restore all except DRAFTS).

Thanks in advance

OUTPUT:

c:\gyb.exe --email xxx@xxx.com --action restore-mbox --local-folder . --debug

Restoring from 5.71GB file .\All mail Including Spam and Trash-7-14-16.mbox...
large files may take some time to open.
send: b'GET /gmail/v1/users/me/labels?fields=labels%28name%2Cid%2Ctype%29&prettyPrint=true&alt=json HTTP/1.1\r\nHost: www.googleapis.com\r\naccept-encoding: gzip, deflate\r\nuser-agent: Got Your Back 0.47 | http://git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.5.1 64-bit final | Windows-10-10.0.10586 AMD64 google-api-python-client/1.5.1 (gzip)\r\naccept: application/json\r\ncontent-length: 0\r\nauthorization: xxx\r\n\r\n'
reply: ''
send: b'GET /gmail/v1/users/me/labels?fields=labels%28name%2Cid%2Ctype%29&prettyPrint=true&alt=json HTTP/1.1\r\nHost: www.googleapis.com\r\naccept-encoding: gzip, deflate\r\nuser-agent: Got Your Back 0.47 | http://git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.5.1 64-bit final | Windows-10-10.0.10586 AMD64 google-api-python-client/1.5.1 (gzip)\r\naccept: application/json\r\ncontent-length: 0\r\nauthorization: xxx\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Expires header: Date header: Cache-Control header: ETag header: Vary header: Vary header: Content-Type header: Content-Encoding header: X-Content-Type-Options header: X-Frame-Options header: X-XSS-Protection header: Server header: Alternate-Protocol header: Alt-send: b'POST /gmail/v1/users/me/labels?fields=id&prettyPrint=true&alt=json HTTP/1.1\r\nHost: www.googleapis.com\r\nuser-agent: Got Your Back 0.47 | http://git.io/gyb | Jay Lee - jay0lee@gmail.com | Python 3.5.1 64-bit final | Windows-10-10.0.10586 AMD64 google-api-python-client/1.5.1 (gzip)\r\ncontent-type: application/json\r\ncontent-length: 87\r\nauthorization: xxx\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\n\r\n'
send: b'{"labelListVisibility": "labelShow", "name": "DRAFTS", "messageListVisibility": "show"}'
reply: 'HTTP/1.1 400 Bad Request\r\n'

400: Invalid label name - invalidArgument
header: Vary header: Vary header: Content-Type header: Content-Encoding header: Date header: Expires header: Cache-Control header: X-Content-Type-Options header: X-Frame-Options header: X-XSS-Protection header: Server header: Alternate-Protocol header: Alt-Svc header: Transfer-Encoding```
@beachlounger
Copy link
Author

beachlounger commented Jul 28, 2016

Jay,

UPDATE- It looks like this was fixed back in March (#95) with the updated of reserved labels including Drafts.

Any idea why this would not be honored in the windows version? I have access to a few linux boxes and will see if the same things happens from the master branch.

@beachlounger
Copy link
Author

beachlounger commented Jul 31, 2016

Confirmed not working with latest branch on an ubuntu based host 14.04, running python 3.5. Same error out on msg 11 with a draft label. Please help.

@jay0lee
Copy link
Member

jay0lee commented Aug 21, 2016

Duplicate of #105

@jay0lee jay0lee closed this as completed Aug 21, 2016
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

2 participants