From 7ec6601554c466e565ee0d18110fd7a9fcbc2e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20=C5=9Eafak?= Date: Wed, 1 Jan 2025 03:45:45 +0300 Subject: [PATCH] v1.90fix2 --- main/HotspotAutoLogin.pyw | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/HotspotAutoLogin.pyw b/main/HotspotAutoLogin.pyw index 7a835de..6f14092 100644 --- a/main/HotspotAutoLogin.pyw +++ b/main/HotspotAutoLogin.pyw @@ -21,7 +21,11 @@ dns.resolver.default_resolver = dns.resolver.Resolver() from urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) - +################################# REMOVE THIS BEFORE USING PYINSTALLER ################################# +# Change the current working directory to the script's directory +script_dir = os.path.dirname(os.path.abspath(__file__)) +os.chdir(script_dir) +################################# REMOVE THIS BEFORE USING PYINSTALLER ################################# # Program Information program_name = "HotspotAutoLogin" @@ -1005,4 +1009,4 @@ if __name__ == '__main__': # Start the network status checking in the main thread check_network_status() # Wait for all threads to finish - tray_thread.join() \ No newline at end of file + tray_thread.join()