[GH-ISSUE #1780] "Exit on StopIteration" with Python 3.7 #1404

Closed
opened 2026-02-27 11:16:56 +03:00 by kerem · 5 comments
Owner

Originally created by @lefta on GitHub (Oct 4, 2019).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1780

Impacted versions

Likely all, tested on 1.14.0 / webmail 1.5.0. Installer / web server are not relevant here.

Steps to reproduce

Open a mail containing an attachment when running with python 3.7, a 500 error will be returned (after several seconds).

Current behavior

Crash with exception "Exit on StopIteration".

Expected behavior

Mmmh... No crash ?

More details

Python 3.7 implements PEP-479 which breaks LEPL, dependency of rfc6266.

However, it seems that neither LEPL nor rfc6266 are maintained anymore. I wrote a drop in replacement for rfc6266 to get it working, however I can't tell about compatibility, security, conformance or stability of it. At least it allows to open mails with attachments and can be used as a base for fixing this issue.

Originally created by @lefta on GitHub (Oct 4, 2019). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1780 # Impacted versions Likely all, tested on 1.14.0 / webmail 1.5.0. Installer / web server are not relevant here. # Steps to reproduce Open a mail containing an attachment when running with python 3.7, a 500 error will be returned (after several seconds). # Current behavior Crash with exception "Exit on StopIteration". # Expected behavior Mmmh... No crash ? # More details Python 3.7 implements [PEP-479](https://www.python.org/dev/peps/pep-0479/) which breaks LEPL, dependency of rfc6266. However, it seems that neither LEPL nor rfc6266 are maintained anymore. I wrote a [drop in replacement for rfc6266](https://github.com/lefta/rfc6266.py) to get it working, however I can't tell about compatibility, security, conformance or stability of it. At least it allows to open mails with attachments and can be used as a base for fixing this issue.
kerem 2026-02-27 11:16:56 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tonioo commented on GitHub (Oct 11, 2019):

@lefta Thanks for the report. Could you please move this issue to the modoboa-webmail repository?

<!-- gh-comment-id:541078394 --> @tonioo commented on GitHub (Oct 11, 2019): @lefta Thanks for the report. Could you please move this issue to the modoboa-webmail repository?
Author
Owner

@lefta commented on GitHub (Oct 11, 2019):

I forgot to make it explicit in my original report, but I filled this issue against Modoboa itself because rfc6266 is a dependency of it, not of the webmail. I had problems only with the webmail, but any Modoboa part decoding the Content-Disposition header with this package will be impacted (and now that it is fixed on my side, I can't test other areas anymore).

This being said, should I still move it ?

<!-- gh-comment-id:541087649 --> @lefta commented on GitHub (Oct 11, 2019): I forgot to make it explicit in my original report, but I filled this issue against Modoboa itself because rfc6266 is a dependency of it, not of the webmail. I had problems only with the webmail, but any Modoboa part decoding the `Content-Disposition` header with this package will be impacted (and now that it is fixed on my side, I can't test other areas anymore). This being said, should I still move it ?
Author
Owner

@tonioo commented on GitHub (Oct 13, 2019):

@lefta Ok, so it's the right place.

<!-- gh-comment-id:541412703 --> @tonioo commented on GitHub (Oct 13, 2019): @lefta Ok, so it's the right place.
Author
Owner

@rvicentiu commented on GitHub (Mar 2, 2020):

Any updates on this bug?

Ran into the same issue with a fresh modoboa install on debian 10.

@lefta Thanks for the patch, it works :)

<!-- gh-comment-id:593310130 --> @rvicentiu commented on GitHub (Mar 2, 2020): Any updates on this bug? Ran into the same issue with a fresh modoboa install on debian 10. @lefta Thanks for the patch, it works :)
Author
Owner

@tonioo commented on GitHub (Mar 3, 2020):

I've finally removed the dependancy to rfc6266 (see github.com/modoboa/modoboa-webmail@2dc6c2fbab).

<!-- gh-comment-id:593863184 --> @tonioo commented on GitHub (Mar 3, 2020): I've finally removed the dependancy to rfc6266 (see https://github.com/modoboa/modoboa-webmail/commit/2dc6c2fbabb2acf1aac2b51afaa04db8009c6d02).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1404
No description provided.