Skip to content
This repository has been archived by the owner on Mar 3, 2025. It is now read-only.

bug: UI 启动时会输出两次MaaFw 版本 #3

Closed
weinibuliu opened this issue Nov 21, 2024 · 1 comment
Closed

bug: UI 启动时会输出两次MaaFw 版本 #3

weinibuliu opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@weinibuliu
Copy link
Owner

NIceGUI 在启用自动重载 (ui.run(load=True)) 时,会运行两次 Python 脚本,详见 zauberzeug/nicegui#794
这会导致 maa 执行两次初始化语句,语句如下:

import os

from .library import Library

__PATH = os.path.join(os.path.dirname(__file__), "bin")

if os.path.exists(__PATH):
    ver = Library.open(__PATH)
    if ver:
        print(f"MaaFw version: {ver}")

目前的解决方案是手动去除 print 语句,自行打印 MaaFw 版本信息。这一暂时性的修复会包含在未来的发行版中,通过命令行启动的用户可考虑自行移除相关 print 语句。

@weinibuliu weinibuliu added the bug Something isn't working label Nov 21, 2024
@weinibuliu weinibuliu self-assigned this Nov 21, 2024
@weinibuliu
Copy link
Owner Author

MaaXYZ/MaaFramework#445 中调整了 Python Binding 的初始化行为,现在不会在初始化时输出任何信息。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant