I'm using ConfigParser to pull IMAP details for email login which works fine on Linux, however I keep getting socket.gaierror: [Errno 11001] getaddrinfo failed
when running on Windows. I'm using Python 3.8.
This is the code causing the error.
self._config = configparser.ConfigParser()
self._config.read('config.ini')
self._mail = imaplib.IMAP4_SSL(self._config.get('imap', 'host'),993) # <- the error
I thought it may have been a race condition, the class initializing before ConfigParser was able to initialize properly however adding a print in there to read out the host worked fine. Pasting the actual imap url string in place of the self._config.get
works