diff --git a/install.bat b/install.bat index 5571188..bee48f6 100644 --- a/install.bat +++ b/install.bat @@ -327,7 +327,7 @@ if "%OCR_READY%"=="0" ( echo. echo Verifying all dependencies... set "ALL_OK=1" -for %%M in (cv2 mss numpy discord transitions rapidfuzz) do ( +for %%M in (cv2 mss numpy transitions rapidfuzz) do ( set "PATH=%TESS_PATH%;%PATH%" "%CONDA_EXE%" run -n botty python -c "import %%M" >nul 2>&1 if !errorlevel! neq 0 ( @@ -337,6 +337,17 @@ for %%M in (cv2 mss numpy discord transitions rapidfuzz) do ( echo %%M: OK ) ) +:: discord.py imports aiohttp which calls ssl.create_default_context() at import +:: time. A malformed cert in the Windows store triggers ASN1 NOT_ENOUGH_DATA. +:: The bot patches this at runtime via _patch_ssl(); check import with the patch. +set "PATH=%TESS_PATH%;%PATH%" +"%CONDA_EXE%" run -n botty python -c "import ssl; ssl.SSLContext.load_default_certs = lambda *a, **kw: None; import discord" >nul 2>&1 +if !errorlevel! neq 0 ( + echo FAILED: discord + set "ALL_OK=0" +) else ( + echo discord: OK +) if "%OCR_READY%"=="0" set "ALL_OK=0" if "%ALL_OK%"=="1" (