1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +08:00

Fix: OSError when loading MAA (#2010)

This commit is contained in:
SarContDeli
2022-12-18 13:34:45 +08:00
committed by GitHub
parent a2e6c401da
commit b12eabc44a
2 changed files with 6 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
import os
import re
import sys
import json
import time
import requests
@@ -28,13 +27,13 @@ class AssistantHandler:
@staticmethod
def load(path, incremental_path=None):
sys.path.append(path)
try:
from submodule.AlasMaaBridge.module.handler import asst_backup
AssistantHandler.Asst = asst_backup.Asst
AssistantHandler.Message = asst_backup.Message
AssistantHandler.Asst.load(path, user_dir=path, incremental_path=incremental_path)
except:
except Exception as e:
logger.error(e)
logger.warning('导入MAA失败尝试使用原生接口导入')
asst_module = import_module('.asst', 'Python')
AssistantHandler.Asst = asst_module.Asst