Skip to content

Exclude voicemail label in push #74

Closed
@learmj

Description

@learmj

Hi. I hit an error trying to push the voicemail tag / label to gmail. I added it to the currently excluded labels in lieer/local.py and it resolved the problem. Here's a back trace:
push: creating label: voicemail.. Traceback (most recent call last): File "/usr/local/bin/gmi", line 8, in <module> g.main () File "/b/git/gmailieer/lieer/gmailieer.py", line 143, in main args.func (args) File "/b/git/gmailieer/lieer/gmailieer.py", line 193, in sync self.push (args, True) File "/b/git/gmailieer/lieer/gmailieer.py", line 246, in push actions.append (self.remote.update (rm, nm, self.local.state.last_historyId, self.force)) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 518, in update return self.__push_tags__ (gid, add, rem) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 534, in __push_tags__ (lid, ll) = self.__create_label__ (a) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 651, in __create_label__ lr = self.service.users ().labels ().create (userId = self.account, body = label).execute () File "/home/xxx/.local/lib/python3.5/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper return wrapped(*args, **kwargs) File "/home/xxx/.local/lib/python3.5/site-packages/googleapiclient/http.py", line 841, in execute raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/xxx/labels?alt=json returned "Invalid label name">
Can you commit this to master please?
Thanks :-)
-- Matt

Activity

learmj

learmj commented on Apr 11, 2018

@learmj
Author

Diff was this:
`diff --git a/lieer/local.py b/lieer/local.py
index 6ddf7e6..47792a6 100644
--- a/lieer/local.py
+++ b/lieer/local.py
@@ -37,6 +37,7 @@ class Local:
'mute',
'todo',
'Trash',

  •                    'voicemail',
                       ])
    

    class RepositoryException (Exception):`

learmj

learmj commented on Apr 11, 2018

@learmj
Author

Code markup is obviously not good for patches!

gauteh

gauteh commented on Apr 11, 2018

@gauteh
Owner

Thanks, best is a PR (with the specific label added to the list in the README as well) or git format-patch patches.

gauteh

gauteh commented on Apr 12, 2018

@gauteh
Owner

Fixed in master, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @gauteh@learmj

      Issue actions

        Exclude voicemail label in push · Issue #74 · gauteh/lieer