From e337495d1cfc5469b8da0886e01526f14a258c32 Mon Sep 17 00:00:00 2001 From: Obie Hinojosa Date: Wed, 28 May 2025 18:17:43 -0500 Subject: [PATCH] resolve SSL errors with wget.download after compiling --- installer.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/installer.py b/installer.py index 15233f1..aa5e9b4 100644 --- a/installer.py +++ b/installer.py @@ -16,8 +16,8 @@ # -----------------import dependencies---------------------- -import wget; import os; import platform; import time ; import sys - +import wget; import os; import platform; +import time; import sys; import certifi import shutil; import tarfile from pathlib import Path @@ -170,6 +170,10 @@ os.mkdir(str("mods")) # download mod archive from git repo and extract print("Fetching mods...") + +os.environ['SSL_CERT_FILE'] = certifi.where() +# this line fixes SSL errors after compiling with PyInstaller as long as certifi is imported alongside it + try: wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.0.1/mods.tar.gz') # this is insane. `wget` the fucking goat. who knew windows package manager was so cool? @@ -179,13 +183,14 @@ except: extract_tar('mods.tar.gz', 'mods') # ('tarfile', 'directory to extract to') -print("sigma!") +print(); print("sigma!") print("all done!") print("This window will exit and close in ten seconds. :)") time.sleep(9) print_ascii_art() # print boykisser to console time.sleep(1) +sys.exit # --------------------the real shit!------------------------