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 parsing labels #545
Comments
|
Inserted a few more prints. Here is how imapsplit is called:
Looks like the parens are not matched correctly. |
Could you show the string |
This is the value of the offending message str: For reference, this is hot the full print log looks like:
|
Thank you. The issue stands in
At line 165, options is In the console, I get this output:
So, our regex fails at matching the first label inside the double quotes. The parenthesis are not offending. |
Github-ref: OfflineIMAP#545 Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
@HeinrichHartmann Could you please try the above version with a fix? |
@nicolas33 Sure!
|
Also I don't see how your fix would help with that string:
Matches Looking for balanced parens would also not fix the issue, since the label can contain arbitrary bracket expressions. |
Note that reproducing this is very easy: Just add a label |
Github-ref: OfflineIMAP#545 Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Sorry, for the noise. I've forgot to change the middle of the regexp. Here is the fix that I intend. |
Looks good. I am still waiting for my full mailbox to be synced up (200K+ Mails), before I can be 100% sure that it worked. |
Ok, let us know. |
New error:
Looks like this regexp is also problematic: Fix ?!
|
Originally-written-by: Heinrich Hartmann <Heinrich@HeinrichHartmann.com> Github-ref: OfflineIMAP#545
Your fix looks good. I've changed the backslashes to the brackets that I find more readable and for consistency. |
Cool. This solves the issue for me. Thanks for fixing it so quickly! |
Thanks for the feedback. |
Reported-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com> Tested-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com> Github-ref: #545 Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
General informations
offlineimap -V
): offlineimap v7.2.0, imaplib2 v2.57 (bundled), Python v2.7.10, OpenSSL 0.9.8zh 14 Jan 2016Configuration file offlineimaprc
...
Logs, error
Steps to reproduce the error
Hit the above error message when syncing my Gmail account.
The text was updated successfully, but these errors were encountered: