mail2googlegroup
mail2googlegroup copied to clipboard
imap2gg: Error while interacting with the IMAP SERVER: ''MailBox' object has no attribute '_criteria_encoder''
Hey, great project, would like to get it working, any ideas what might be wrong?
I'm not using any filters
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.
~~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.
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.
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.
Looks like the count=1
fix is to set the count
variable to 1 on this line:
https://github.com/XaviTorello/mail2googlegroup/blob/fa835a475df9e06cf7d2ebdbccb83a269f68e84f/mail2gg/init.py#L120
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: https://github.com/XaviTorello/mail2googlegroup/issues/5
If you are looking to get this working with the count fix, follow these instructions (Linux):
- Clone the repository
git clone https://github.com/XaviTorello/mail2googlegroup.git
- Move into the directory
cd mail2googlegroup
- Open the file with that line of code in your editor of choice
vi mail2gg/__init__.py
- 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)
- Install local package with pip3
pip3 install -e .
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.