-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Missing GMail labels #48
Comments
Just for the record: Labels have internal id like that, they are not necessarily the names you gave them. For example, I have a label ubuntu-devel, but it's internal id is Label_44. Here it's mapping the internal ids to the names AFAICT. |
Julian Andres Klode writes on november 15, 2017 11:53:
Just for the record: Labels have internal id like that, they are not necessarily the names you gave them. For example, I have a label ubuntu-devel, but it's internal id is Label_44. Here it's mapping the internal ids to the names AFAICT.
That's correct; we fetch the label list at start-up with all the
mappings. You can print them with the '-t' option for `pull` I believe.. Does the relevant label show there? If you know what it is.
Does re-starting the pull fix the issue? I don't know why not all the
labels are pulled, could be an API issue.
|
|
Giulio Eulisse writes on november 15, 2017 16:18:
`gmi pull -t` shows labels and the third one in the output order is `FromMailingList`, however I see no mapping output. Restarting the pull did not help. I do have somewhat strange labels though, like `R&D` or `Something/something - (else)" could that be a problem?
I don't think so.
I've added a change on master which also prints the gmail key. Can you
see if you also get the problematic Label_3?
- gaute
|
I don't get any
|
Giulio Eulisse writes on november 16, 2017 11:28:
I don't get any `Label_3`:
```
+ gmi pull -t
+ grep Label_3
CWG4 Label_3939416323915462435
OpenSource Mailing lists Label_3194149110520196790
CMS Label_394156353969411168
Nix Label_3817195439730139360
Simulation & Generators Label_3946793891174421901
Infrastructure Label_3990267443586131481
WP3 - Tools Label_3023913578609897416
Daily Build Reports Label_330431641839543684
Banking Label_3461285147915119731
```
Do you have the chance to go here: https://developers.google.com/gmail/api/v1/reference/users/labels/list
Enter your email in the example API on the right and post the result
somewhere? I realize this is private, what I'm looking for is anything
else than just labels.. According to the docs there shouldn't be any
nextPage fields, but maybe you have enough labels..
|
Ciao, |
Giulio Eulisse writes on november 16, 2017 11:46:
Ciao,
I just did and AFAICT, there is no pagination entry in the output (nor `Label_3). I will try reducing the number of labels. How do you get Label_3 in the first place? Is it attached to the message?
Yes, it comes from message.get().
|
Did you identify which message has the Label_3? You could maybe add a print google-id so that you get some more output before it crashes (in Local.update_tags). Then you could try and fetch that message from the Gmail API explorer and see if the label is actually there as well. Can you test out labels.get() on Label_3 in the API explorer? Maybe it shows up if you try to fetch it directly.. |
For the moment I just patched it to add an |
Giulio Eulisse writes on november 16, 2017 14:46:
For the moment I just patched it to add an `unknown` label in case the Remote label is not found. That should allow me to identify the broken messages as well. I want to get to the end and see how much I like notmuch before I spend time debugging this.
Good plan. You might want to add unknown to ignored labels so that its
not synced back up to your account if you do push or sync.
Or just avoid pushing up before you've figured out the issue.
…-g
|
Thanks for mentioning the ignored label stuff. I was actually wondering about that. I will add it. If I understand what's going on I'll let you know right away. |
Giulio Eulisse writes on november 16, 2017 14:55:
Thanks for mentioning the ignored label stuff. I was actually wondering about that. I will add it. If I understand what's going on I'll let you know right away.
Thanks, appreciate the effort.
|
Thank you. If this works as I expect it to work and scales to my mailbox size, you made an happy man.. ;-) |
This adds a notmuch "unknown" tag whenever a label id which cannot be found in the list of available label ids is retrieved from a message. Notice the "unknown" tag is never synchronized.
With #49, I am able to go past my issue and I've a full sync done. Notice that some of the messages which are reported to have "Label_3" do not actually have any label associated. I wonder if this is simply a problem with some old labelling schema on google side.. |
Weird; if you put in the messages in https://developers.google.com/gmail/api/v1/reference/users/messages/get do they show Label_3? |
Fixed in #51: If you encounter this error run:
and re-try the pull. This will drop any labels that cannot be found remotely. If the message tags are modified locally (through notmuch) the label will be removed on the remote side on the next push/sync. |
Similarly to #46 I've:
I did not create a label while it was running and I do not have
Label_3
as label.The text was updated successfully, but these errors were encountered: