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

imap2gg: Error while interacting with the IMAP SERVER: ''MailBox' object has no attribute '_criteria_encoder'' #6

Open
olso opened this issue Feb 17, 2021 · 7 comments

Comments

@olso
Copy link

olso commented Feb 17, 2021

Hey, great project, would like to get it working, any ideas what might be wrong?

I'm not using any filters

@switchdk
Copy link

I ran into the same problem but noticed that the code in question had been removed from an earlier version of an imported library. After running pip install imap-tools==0.22.0 it started working for me. Not sure if this is ideal since imap-tools is currently version 0.31 but at least it should get you started.

@sdepablos
Copy link

sdepablos commented Apr 14, 2021

I was getting the same error, and after downgrading to imap-tools==0.30.0 everything works as expected. This is somehow related to issue #3. @XaviTorello I think that after you downgraded the library you didn't make a release (or the release was wrong), because doing a pip install mail2gg I got the latest imap-tools release, currently 0.39.0, not the fixed 0.30.0 version we're supposed to get.

I was wrong: version 0.30.0 also fails, it worked just because I had the "count=1" fix. Version 0.22.0 works fine.

@vazome
Copy link

vazome commented Nov 8, 2021

Same: Gmail to Google Group

Honestly, I don't know how to apply your fix.

I think this should be mentioned in README if possible until an official update fixing the things arrives.

@mrk3767
Copy link

mrk3767 commented Jan 5, 2022

Running into the same issue here. Syncing from a Dreamhost IMAP server. Will post back if I find a solution, but would really appreciate any help.

@mrk3767
Copy link

mrk3767 commented Jan 5, 2022

Looks like the count=1 fix is to set the count variable to 1 on this line:

count = self.count_elements(remote_mailbox)

Doing so prevents the code from calling search() on the remote mailbox which is where the error is coming from. I'm wondering if there are any important side-effects to not having a count...

Found this in the following issue: #5

@mrk3767
Copy link

mrk3767 commented Jan 5, 2022

If you are looking to get this working with the count fix, follow these instructions (Linux):

  1. Clone the repository
    git clone https://github.com/XaviTorello/mail2googlegroup.git
  2. Move into the directory
    cd mail2googlegroup
  3. Open the file with that line of code in your editor of choice
    vi mail2gg/__init__.py
  4. Change the count line and comment out the old value
    OLD -> count = self.count_elements(remote_mailbox) NEW -> count = 1 #self.count_elements(remote_mailbox)
  5. Install local package with pip3
    pip3 install -e .

@five2seven
Copy link

If you are looking to get this working with the count fix, follow these instructions (Linux):

1. Clone the repository
   `git clone https://github.com/XaviTorello/mail2googlegroup.git`

2. Move into the directory
   `cd mail2googlegroup`

3. Open the file with that line of code in your editor of choice
   `vi mail2gg/__init__.py`

4. Change the count line and comment out the old value
   OLD -> `count = self.count_elements(remote_mailbox)` NEW -> `count = 1 #self.count_elements(remote_mailbox)`

5. Install local package with pip3
   `pip3 install -e .`

Thank you so much! This finally got me up and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants