alas 使用最新版maa 报错
在提问之前...
- [X] 我已经搜索了现有的 issues
- [X] 我在提问题之前至少花费了 5 分钟来思考和准备
- [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [X] 我正在使用最新版的 Alas
描述你的问题
一直都是正常使用,最近更新的maa,在alas中使用的maa插件报错,之前是正常的。
如何复现
- 前往 '...'
- 点击 '....'
- 滑动到 '....'
- 出现问题
预期行为
No response
相关 Logs
═══════════════════════════════════════════════════════════════════════════════════
MAASTARTUP
═══════════════════════════════════════════════════════════════════════════════════
INFO 20:08:56.055 │ Task call: MaaStartup
INFO 20:08:56.057 │ Bind task ['General', 'Alas', 'MaaStartup', 'Maa']
INFO 20:08:56.058 │ Save config ./config\maa.maa.json,
MaaStartup.Scheduler.NextRun=datetime.datetime(2024, 10, 22, 20, 8, 56),
MaaStartup.Scheduler.Enable=True, Commission.Scheduler.Enable=True,
Research.Scheduler.Enable=True, Reward.Scheduler.Enable=True
INFO 20:08:56.061 │ MAA安装路径:D:\Program Files\MAA
ERROR 20:09:02.320 │ OSError: [WinError 1114] 动态链接库(DLL)初始化例程失败。
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ D:\Program Files\AzurLaneAutoScript\alas.py:69 in run │
│ │
│ 67 │ │ │ if not skip_first_screenshot: │
│ 68 │ │ │ │ self.device.screenshot() │
│ ❱ 69 │ │ │ self.__getattribute__(command)() │
│ 70 │ │ │ return True │
│ 71 │ │ except TaskEnd: │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ command = 'maa_startup' │ │
│ │ e = OSError(22, │ │
│ │ '动态链接库(DLL)初始化例程失败。', None, │ │
│ │ 1114, None) │ │
│ │ self = <submodule.AlasMaaBridge.maa.ArknightsAut… │ │
│ │ object at 0x0000019764C52208> │ │
│ │ skip_first_screenshot = False │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ D:\Program Files\AzurLaneAutoScript\submodule\AlasMaaBridge\maa.py:121 │
│ in maa_startup │
│ │
│ 119 │ │
│ 120 │ def maa_startup(self): │
│ ❱ 121 │ │ AssistantHandler(config=self.config, asst=self.asst).sta │
│ 122 │ │
│ 123 │ def maa_annihilation(self): │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ self = <submodule.AlasMaaBridge.maa.ArknightsAutoScript object at │ │
│ │ 0x0000019764C52208> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ D:\Program Files\AzurLaneAutoScript\toolkit\lib\site-packages\cached_p │
│ roperty.py:36 in __get__ │
│ │
│ 34 │ │ │ return self._wrap_in_coroutine(obj) │
│ 35 │ │ │
│ ❱ 36 │ │ value = obj.__dict__[self.func.__name__] = self.func(obj │
│ 37 │ │ return value │
│ 38 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ cls = <class 'submodule.AlasMaaBridge.maa.ArknightsAutoScript'> │ │
│ │ obj = <submodule.AlasMaaBridge.maa.ArknightsAutoScript object at │ │
│ │ 0x0000019764C52208> │ │
│ │ self = <cached_property.cached_property object at │ │
│ │ 0x0000019766BF1F08> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ D:\Program Files\AzurLaneAutoScript\submodule\AlasMaaBridge\maa.py:74 │
│ in asst │
│ │
│ 72 │ │ │ │ │ './cache/resource/global/' + self.config.Maa │
│ 73 │ │ │ │ ) │
│ ❱ 74 │ │ │ AssistantHandler.load(self.config.MaaEmulator_MaaPat │
│ 75 │ │ except ModuleNotFoundError: │
│ 76 │ │ │ logger.critical('找不到MAA,请检查安装路径是否正确') │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ incremental_path = ['D:\\Program Files\\MAA\\./cache'] │ │
│ │ self = <submodule.AlasMaaBridge.maa.ArknightsAutoScri… │ │
│ │ object at 0x0000019764C52208> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ D:\Program Files\AzurLaneAutoScript\submodule\AlasMaaBridge\module\han │
│ dler\handler.py:34 in load │
│ │
│ 32 │ │ AssistantHandler.Message = utils.Message │
│ 33 │ │ AssistantHandler.InstanceOptionType = utils.InstanceOpti │
│ ❱ 34 │ │ AssistantHandler.Asst.load(path, user_dir=path, │
│ incremental_path=incremental_path) │
│ 35 │ │ │
│ 36 │ │ AssistantHandler.ASST_HANDLER = None │
│ │
│ ╭──────────────────────── locals ────────────────────────╮ │
│ │ incremental_path = ['D:\\Program Files\\MAA\\./cache'] │ │
│ │ path = 'D:\\Program Files\\MAA' │ │
│ ╰────────────────────────────────────────────────────────╯ │
│ │
│ D:\Program Files\AzurLaneAutoScript\submodule\AlasMaaBridge\module\ass │
│ t\asst.py:69 in load │
│ │
│ 67 │ │ except KeyError: │
│ 68 │ │ │ os.environ[platform_values[platform_type]['environ_v │
│ str(path) │
│ ❱ 69 │ │ Asst.__lib = lib_import_func(str(Asst.__libpath)) │
│ 70 │ │ Asst.__set_lib_properties() │
│ 71 │
│ │
│ ╭─────────────────────────── locals ────────────────────────────╮ │
│ │ incremental_path = ['D:\\Program Files\\MAA\\./cache'] │ │
│ │ lib_import_func = <class 'ctypes.WinDLL'> │ │
│ │ path = 'D:\\Program Files\\MAA' │ │
│ │ platform_type = 'windows' │ │
│ │ platform_values = { │ │
│ │ │ 'windows': { │ │
│ │ │ │ 'libpath': 'MaaCore.dll', │ │
│ │ │ │ 'environ_var': 'PATH' │ │
│ │ │ }, │ │
│ │ │ 'darwin': { │ │
│ │ │ │ 'libpath': 'libMaaCore.dylib', │ │
│ │ │ │ 'environ_var': 'DYLD_LIBRARY_PATH' │ │
│ │ │ }, │ │
│ │ │ 'linux': { │ │
│ │ │ │ 'libpath': 'libMaaCore.so', │ │
│ │ │ │ 'environ_var': 'LD_LIBRARY_PATH' │ │
│ │ │ } │ │
│ │ } │ │
│ │ user_dir = 'D:\\Program Files\\MAA' │ │
│ ╰───────────────────────────────────────────────────────────────╯ │
│ │
│ D:\Program Files\AzurLaneAutoScript\toolkit\lib\ctypes\__init__.py:364 │
│ in __init__ │
│ │
│ 362 │ │ │
│ 363 │ │ if handle is None: │
│ ❱ 364 │ │ │ self._handle = _dlopen(self._name, mode) │
│ 365 │ │ else: │
│ 366 │ │ │ self._handle = handle │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _FuncPtr = <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'> │ │
│ │ flags = 0 │ │
│ │ handle = None │ │
│ │ mode = 0 │ │
│ │ name = 'D:\\Program Files\\MAA\\MaaCore.dll' │ │
│ │ self = <WinDLL 'D:\Program Files\MAA\MaaCore.dll', │ │
│ │ handle 0 at 0x19766bfc3c8> │ │
│ │ use_errno = False │ │
│ │ use_last_error = False │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
OSError: [WinError 1114] 动态链接库(DLL)初始化例程失败。
INFO 20:09:02.799 │ No provider specified, skip sending
截图
No response
还有别的吗?
No response
maa本体是V5.8.0-beta2
maa本体是V5.8.0-beta2
前几天maa刚更新了我这就出现了同样的问题,求解
同样遇到该问题,根据提示尝试用管理员模式运行alas,未解决,log与上面的一致。
遇到了同样的问题,MAA的核心dll可能做了不兼容变更,需要作者大大有空的时候修复下
cy,一样的报错
同。
cy,同样
所以这个要怎么解决呢?
同样遇到了
maa 更新了 Microsoft.VCRedist.2015+.x64 Microsoft.DotNet.DesktopRuntime.8,也许alas需要做兼容处理?
问题实际上并没有解决 相关log: 2024-11-10_maa.txt
致遇到了相同问题准备回复的人
由于每个 Issue 甚至整个项目都是可以订阅通知的, 对于已经有人汇报过的 Bug, 如果您也遇到了并且没有其他信息要补充, 可以直接在左下点个赞表示 +1, 不要再去新增评论。想关注后续的可以用 Subscribe,Subscribe 之后该 Issue 如果有变动都可以收到通知,如果不想被回复打扰可以使用更加进阶的 Customize 功能,勾选 "Closed" & "Reopened"。Closed 通常代表该 Issue 已被解决,极少数情况下的 Reopened 代表该 Issue 的问题重新出现。如果您新增了无意义评论,因为 Issue 这个 bug tracker 与邮件列表类似,订阅某个 Issue 的用户会在每次这个 Issue 有新的动态时收到一封新的提醒邮件。也就是说,在 Issue 中的一个不能提供新的信息的评论,相当于给所有订阅这个 Issue 的用户发了一封垃圾邮件(spam)。尤其项目的维护者也是订阅者中的一员,太多垃圾邮件会对维护者带来很多不必要的困扰。发送垃圾邮件在开源社区通常是不那么受欢迎的行为。
之前在解读问题的过程中陷入了误区,我已经重新尝试解决
修复之后依然还是存在报错,是怎么回事呢
目前测试确认5.7.0版本可用,后续版本会报错
#4354 中提及 我已解决无法调用maa的问题。 原因如下: alas先加载了安装包中内置的低版本dll文件,导致maa无法使用高版本dll文件。 附本人电脑上的文件地址作为参考 F:\Game\phone\tools\AlasApp_0.4.7_fullcn\AzurLaneAutoScript\toolkit\Lib\site-packages\PIL 解决方法: 进入alas的安装目录中,找到文件夹中的MSVCP140.dll(或显示为msvcp.dll)将其删除即可。 经测试删除该文件后可正常使用。 作者 AsahiWys