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

"cannot reduce request any further" #54

Closed
pazz opened this issue Nov 21, 2017 · 9 comments
Labels

Comments

@pazz
Copy link

@pazz pazz commented Nov 21, 2017

I set up alot to use the maildir syncronized by gmailieer as send_box. When I send a mail (and store and tag it "sent") and then syncronize I get the following error.

[~/mail/account.patricktotzke.gmail.com] ~/projects/gmailieer/gmi sync                                                    
receiving metadata:   0%|                                                                                               | 0/9 [00:00<?, ?it/s]reducing batch request size to: 25
reducing batch request size to: 12
reducing batch request size to: 6
Traceback (most recent call last):
  File "/home/pazz/projects/gmailieer/lieer/remote.py", line 282, in get_messages
    batch.execute (http = self.http)
  File "/usr/lib/python3/dist-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/googleapiclient/http.py", line 1451, in execute
    self._callback(request_id, response, exception)
  File "/home/pazz/projects/gmailieer/lieer/remote.py", line 258, in _cb
    raise Remote.BatchException(excep)
lieer.remote.BatchException: <HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/patricktotzke%40gmail.com/messages/1511291035.M158427P31771Q1.piu?format=minimal&alt=json returned "Invalid id value">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pazz/projects/gmailieer/gmi", line 8, in <module>
    g.main ()
  File "/home/pazz/projects/gmailieer/lieer/gmailieer.py", line 143, in main
    args.func (args)
  File "/home/pazz/projects/gmailieer/lieer/gmailieer.py", line 193, in sync
    self.push (args, True)
  File "/home/pazz/projects/gmailieer/lieer/gmailieer.py", line 238, in push
    self.remote.get_messages (gids, _got_msg, 'minimal')
  File "/home/pazz/projects/gmailieer/lieer/remote.py", line 109, in func_wrap
    return func (self, *args, **kwargs)
  File "/home/pazz/projects/gmailieer/lieer/remote.py", line 305, in get_messages
    raise Remote.BatchException ("cannot reduce request any further")
lieer.remote.BatchException: cannot reduce request any further
[1]    431 abort      ~/projects/gmailieer/gmi sync

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Nov 21, 2017

@pazz

This comment has been minimized.

Copy link
Author

@pazz pazz commented Nov 22, 2017

@pazz pazz closed this Nov 22, 2017
@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Nov 22, 2017

@pazz

This comment has been minimized.

Copy link
Author

@pazz pazz commented Nov 22, 2017

To be honest, I'm reverting to imap for the moment, because my sync happens in a cronjob and I cannot be bothered to check the logs for unexpected failures.

I think that your restrictions are reasonable. Most of those are out of your hand anyway. You just need to make it explicit so that users understand the deal. What could help would be if you get some users share their GUI setup files, say for mutt, notmuch/emacs or alot.

I would advise to keep it simple instead of adding insert/send commands. The power of notmuch and friends in my opinion lies in the UNIX philosophy, that you have many small parts that do very simple jobs very well. For me ideally, this project would only sync labels between notmuch and gmail, and leave downloading messages to some other tool, say via imap. That might be impossible due to technical restrictions, but you'll know better than I do. I would happily accept the slowdown in synchronization this might introduce, for the added benefit of having stable imap sync independently in case this tagsync tool fails. But that's just my 2¢..

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Nov 22, 2017

Yeah, agreed. The main purpose for me was something simple that fetches the emails quickly and syncs the tags. It is easier to keep track of both together. I'm not sure IMAP actually transfers emails any faster than gmi does. Anyway, thanks for your comments.

Btw, it says in the tag-line that gmailieer only fetches emails.

@julian-klode

This comment has been minimized.

Copy link
Contributor

@julian-klode julian-klode commented Nov 22, 2017

I was considering writing something that takes email in an outbox tag or something and sends them via the API asynchronously (well, I'd run it when gmi is pushing). But not clear plans yet.

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Nov 22, 2017

@julian-klode

This comment has been minimized.

Copy link
Contributor

@julian-klode julian-klode commented Nov 22, 2017

Yeah, writing an MTA.

@gauteh

This comment has been minimized.

Copy link
Owner

@gauteh gauteh commented Nov 22, 2017

@gauteh gauteh added the gmail-api label Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.