simonrob / email-oauth2-proxy

An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.
Apache License 2.0
785 stars 84 forks source link

ModuleNotFoundError: No module named 'asyncore' #222

Closed mtlg closed 7 months ago

mtlg commented 7 months ago

With Python 3.12.1 now on Fedora, I get the error "ModuleNotFoundError: No module named 'asyncore'" for the latest release, 2023.12.19.

When started without GUI, it runs fine.

Apparently the obsolescence warning was suppressed in the source, but now it is an error.

simonrob commented 7 months ago

Did you upgrade from an older Python version? The warning is suppressed because pyasyncore provides this import when needed. Re-install dependencies to fix this if so.

However, if this is not the case, I'm curious about the proxy running without issue when not using the GUI. Please could you provide more information about your setup – are you using the PyPI module, or the pre-built binary? Or are you running from source directly? The reason this is odd is that asyncore is required whether using the GUI or not, so that shouldn't be a factor.

mtlg commented 7 months ago

I had installed from source a few years ago and since then I "upgrade" by manually checking and propagating the differences using "merge". Definitely none of the supported ways. :-)

The issue appeared after I have upgraded to Fedora 39. But you are right, after I have updated with pip install -r the requirements for both the core and the gui from the tar of the 2023.12.19 release and all seems fine.

Sorry for the noise. :-( Maybe I should reinstall using a supported method or get more practice using Python.

simonrob commented 7 months ago

No problem – thanks for following up.

Just to be clear, running from source is absolutely a supported method, but the caveat is that you need to manually handle any dependency changes by running python -m pip install -r requirements-core.txt -r requirements-gui.txt.