Skip to content

Unable to limit the number of emails to pull #164

Description

@Lattitude75

I have been unable to limit emails using the --limit option. Initially, I got the following error.

File "/usr/lib/python3.8/site-packages/lieer/gmailieer.py", line 608, in full_pull
    raise argparse.ArgumentError ('--limit with "remove_local_messages" will cause lots of messages to be deleted')
TypeError: __init__() missing 1 required positional argument: 'message'

After looking at the code, I found that a dry run might help, otherwise the update does not move forward and this time I repeatedly got keyError:xxxxxx like so

  File "/usr/lib/python3.8/site-packages/lieer/local.py", line 569, in update_tags
    fname = os.path.join (self.md, self.gids[gid])
KeyError: 'xxxxxxxxxxxxx'

The only way it could move ahead was by commenting out lines 607 and 608 in gmailieer.py:

      #if self.limit and not self.dry_run:
        #raise argparse.ArgumentError ('--limit with "remove_local_messages" will cause lots of messages to be deleted')

Now, I am able to limit the mails just by using:

gmi pull --limit 500

Is this a bug, or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions