resolve SSL errors with wget.download after compiling

This commit is contained in:
Obie Hinojosa 2025-05-28 18:17:43 -05:00
parent 9ca75600bd
commit e337495d1c

View File

@ -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!------------------------