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

Exclude voicemail label in push #74

Closed
learmj opened this issue Apr 11, 2018 · 4 comments
Closed

Exclude voicemail label in push #74

learmj opened this issue Apr 11, 2018 · 4 comments

Comments

@learmj
Copy link

learmj commented Apr 11, 2018

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

@learmj
Copy link
Author

learmj commented Apr 11, 2018

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
Copy link
Author

learmj commented Apr 11, 2018

Code markup is obviously not good for patches!

@gauteh
Copy link
Owner

gauteh commented Apr 11, 2018

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

@gauteh
Copy link
Owner

gauteh commented Apr 12, 2018

Fixed in master, thanks.

@gauteh gauteh closed this as completed Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants