I have a Gmail Takeout created MBOX that I don't seem to be able to restore due to a label creation error. If I strip the labels then it seems to import. But I have probably over 100 labels and preserving them and the label hierarchy are of importance.
Using backup folder C:\gyb
Restoring from C:\gyb\All_mail.mbox
Traceback (most recent call last):
File "gyb.py", line 1323, in <module>
File "gyb.py", line 991, in main
File "imaplib.pyo", line 413, in create
File "imaplib.pyo", line 1087, in _simple_command
File "imaplib.pyo", line 917, in _command_complete
imaplib.error: CREATE command error: BAD ['Could not parse command']
C:\gyb>gyb --email XXXXX...@gmail.com --action restore-mbox --local-folder C:\gyb --strip-labels Using backup folder C:\gyb
Restoring from C:\gyb\All_mail.mbox
Suggestions on how to further troubleshoot? Have tried on Mac and Windows - makes no difference. Must be an issue with one or more of the Gmail labels. Some do contain spaces, is there maybe a quoteblock missing in the GYB code that is having issues creating new labels with spaces. Or with nested labels. Or nested labels with spaces. I don't know - just guessing.