_overlapped import error (invalid argument)

Author: KLRussellCreated Jul 2, 2020Updated Jul 19, 2026
Labelsplatform:Windowsstate:need infobug

I compiled an .exe with the code below using pyinstaller and keep getting the error in the screenshot. Normally this would trigger whenever you import asyncio or exchangelib modules because they eventually reference to the _overlapped module. Normally, running the script below in python works great, but something about running in a frozen state even with including it as data still makes this not work. I am running Python 3.7.7 with pyinstaller 3.6

import _overlapped

print('hi')

image