mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Fix: Unable to run in pythonw.exe
This commit is contained in:
@@ -9,10 +9,14 @@ from module.config.dictionary import dic_true_eng_to_eng, dic_eng_to_true_eng
|
||||
from module.config.update import get_config
|
||||
from module.logger import pyw_name
|
||||
|
||||
if sys.stdout.encoding != 'UTF-8':
|
||||
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
|
||||
if sys.stderr.encoding != 'UTF-8':
|
||||
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict')
|
||||
|
||||
try:
|
||||
if sys.stdout.encoding != 'UTF-8':
|
||||
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')
|
||||
if sys.stderr.encoding != 'UTF-8':
|
||||
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer, 'strict')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
@Gooey(
|
||||
|
||||
Reference in New Issue
Block a user