Closed yjj5855 closed 3 months ago
描述错误: debug启动后, 执行任务报错, 文件目录获取错误, 获取到python版本目录Lib\\site-packages中去了
Lib\\site-packages
复现步骤 按照以下步骤复现行为:
截图 : 如果适用,添加截图以帮助解释您的问题。
脚本软件版本: 0.1.21
windows操作系统: Windows 10
模拟器版本: pc鸣潮
上传日志:
2024-07-23 20:30:09,877 INFO MainThread OK:AutoHelper init, config: {'debug': True, 'use_gui': True, 'config_folder': 'configs', 'gui_icon': 'D:\\srxm\\ok-wuthering-waves\\icon.png', 'ocr': {'lib': 'RapidOCR'}, 'template_matching': {'coco_feature_json': 'assets\\_annotations.coco.json', 'default_horizontal_variance': 0.002, 'default_vertical_variance': 0.002, 'default_threshold': 0.9}, 'windows': {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True}, 'supported_resolution': {'ratio': '16:9', 'min_size': (1600, 900)}, 'analytics': {'report_url': 'http://111.231.71.225/report'}, 'update': {'releases_url': 'https://api.github.com/repos/ok-oldking/ok-wuthering-waves/releases?per_page=15', 'proxy_url': 'http://111.231.71.225/', 'exe_name': 'ok-ww.exe', 'use_proxy': True}, 'about': '\n <h3>OK-WW</h3>\n <p>GitHub <a href="https://github.com/ok-oldking/ok-wuthering-waves">https://github.com/ok-oldking/ok-wuthering-waves</></p>\n <p>Report a BUG <a href="https://github.com/ok-oldking/ok-wuthering-waves/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D">https://github.com/ok-oldking/ok-wuthering-waves/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D</></p>\n <p>QQ群:<a href="https://qm.qq.com/q/qMezq2IDGU">970523295</a></p>\n <p>QQ频道:<a href="https://pd.qq.com/s/75758wrmp">OK-WW</a></p>\n <p style="color:red;">\n <strong>本软件是免费开源的。</strong> 如果你被收费,请立即退款。请访问QQ频道或GitHub下载最新的官方版本。\n </p>\n <p style="color:red;">\n <strong>本软件仅供个人使用,用于学习Python编程、计算机视觉、UI自动化等。</strong> 请勿将其用于任何营利性或商业用途。\n </p>\n <p style="color:red;">\n <strong>使用本软件可能会导致账号被封。</strong> 请在了解风险后再使用。\n </p>\n', 'supported_screen_ratio': '16:9', 'screenshots_folder': 'screenshots', 'gui_title': 'OK-WW', 'log_file': 'logs/ok-script.log', 'error_log_file': 'logs/ok-script_error.log', 'version': 'v5.0.11', 'onetime_tasks': [<class 'src.task.FarmEchoTask.FarmEchoTask'>, <class 'src.task.FarmWorldBossTask.FarmWorldBossTask'>], 'trigger_tasks': [<class 'src.task.AutoCombatTask.AutoCombatTask'>, <class 'src.task.SkipDialogTask.AutoDialogTask'>, <class 'src.task.AutoPickTask.AutoPickTask'>]} 2024-07-23 20:30:09,881 INFO MainThread OK:SetProcessDpiAwareness 0 2024-07-23 20:30:09,881 DEBUG MainThread HwndWindow:update_frame_size:0x0 to 0x0 2024-07-23 20:30:09,883 INFO MainThread HwndWindow:found hwnd 197204 D:\Wuthering Waves\Wuthering Waves Game\Client\Binaries\Win64\Client-Win64-Shipping.exe UnrealWindow real:0,0,0,0 2024-07-23 20:30:09,884 INFO MainThread HwndWindow:do_update_window_size changed,visible:False x:1 y:58 window:2560x1440 self.window:2584x1504 real:0x0 2024-07-23 20:30:09,891 DEBUG MainThread Config:init self.config = {'preferred': 'pc', 'pc_full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe', 'capture': 'windows'} 2024-07-23 20:30:09,894 DEBUG RefreshAdb HwndWindow:update_frame_size:0x0 to 0x0 2024-07-23 20:30:09,897 INFO RefreshAdb HwndWindow:found hwnd 197204 D:\Wuthering Waves\Wuthering Waves Game\Client\Binaries\Win64\Client-Win64-Shipping.exe UnrealWindow real:0,0,0,0 2024-07-23 20:30:09,923 DEBUG MainThread Screenshot:init Screenshot D:\srxm\ok-wuthering-waves\screenshots None 2024-07-23 20:30:09,924 DEBUG MainThread Screenshot:load font C:\Windows\Fonts\msyh.ttc 2024-07-23 20:30:10,031 DEBUG RefreshAdb WindowsGraphicsCaptureMethod:check available WINDOWS_BUILD_NUMBER:19045 >= 17134 True 2024-07-23 20:30:10,031 DEBUG RefreshAdb WindowsCaptureFactory:try BitBlt method {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True} title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False current_type:<class 'NoneType'> 2024-07-23 20:30:10,035 INFO RefreshAdb DeviceManager:capture method <class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:10,036 DEBUG RefreshAdb BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:10,036 DEBUG RefreshAdb DeviceManager:refresh {'pc': {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'}} 2024-07-23 20:30:10,531 DEBUG MainThread App:resources.qt_resource_name b'\x00\x03\x00\x00x\xa3\x00q\x00s\x00s\x00\x04\x00\x06\xfa^\x00i\x00c\x00o\x00n\x00\x04\x00\x06\xc4\xee\x00i\x001\x008\x00n\x00\x08\x0e8\x05}\x00z\x00h\x00_\x00C\x00N\x00.\x00q\x00m\x00\x08\naB\x7f\x00i\x00c\x00o\x00n\x00.\x00i\x00c\x00o\x00\x04\x00\x06\xa8\x8b\x00d\x00a\x00r\x00k\x00\x05\x00r\xfd\xf4\x00l\x00i\x00g\x00h\x00t\x00\x12\x0c\xf9E\xe3\x00m\x00e\x00s\x00s\x00a\x00g\x00e\x00_\x00w\x00i\x00n\x00d\x00o\x00w\x00.\x00q\x00s\x00s\x00\x0e\r\x92\xd4\xa3\x00s\x00t\x00a\x00t\x00u\x00s\x00_\x00b\x00a\x00r\x00.\x00q\x00s\x00s\x00\x08\x08\x87U\x83\x00c\x00a\x00r\x00d\x00.\x00q\x00s\x00s\x00\x08\x0bcU\x87\x00s\x00t\x00o\x00p\x00.\x00s\x00v\x00g\x00\x07\nuXC\x00t\x00a\x00b\x00.\x00q\x00s\x00s' cfg.themeMode Theme.AUTO 2024-07-23 20:30:10,546 DEBUG MainThread App:locale name zh_CN 2024-07-23 20:30:10,559 DEBUG MainThread App:translator install success 开发工具 2024-07-23 20:30:10,560 DEBUG MainThread GithubMultiDownloader:proxys = ['https://mirror.ghproxy.com', 'https://ghproxy.net', 'https://kkgithub.com', 'https://gh.h233.eu.org', 'https://gh.ddlc.top', 'https://dl.ghpig.top', 'https://slink.ltd', 'https://gh.con.sh', 'https://cors.isteed.cc/github.com', 'https://hub.gitmirror.com', 'https://sciproxy.com/github.com', 'https://ghproxy.cc', 'https://cf.ghproxy.cc', 'https://www.ghproxy.cc', 'https://ghproxy.cn', 'https://www.ghproxy.cn', 'https://gh.jiasu.in', 'https://dgithub.xyz', 'https://download.ixnic.net', 'https://download.nuaa.cf', 'https://download.yzuu.cf'] 2024-07-23 20:30:10,560 INFO MainThread OK:initializing OK, config: {'debug': True, 'use_gui': True, 'config_folder': 'configs', 'gui_icon': 'D:\\srxm\\ok-wuthering-waves\\icon.png', 'ocr': {'lib': 'RapidOCR'}, 'template_matching': {'coco_feature_json': 'assets\\_annotations.coco.json', 'default_horizontal_variance': 0.002, 'default_vertical_variance': 0.002, 'default_threshold': 0.9}, 'windows': {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True}, 'supported_resolution': {'ratio': '16:9', 'min_size': (1600, 900)}, 'analytics': {'report_url': 'http://111.231.71.225/report'}, 'update': {'releases_url': 'https://api.github.com/repos/ok-oldking/ok-wuthering-waves/releases?per_page=15', 'proxy_url': 'http://111.231.71.225/', 'exe_name': 'ok-ww.exe', 'use_proxy': True}, 'about': '\n <h3>OK-WW</h3>\n <p>GitHub <a href="https://github.com/ok-oldking/ok-wuthering-waves">https://github.com/ok-oldking/ok-wuthering-waves</></p>\n <p>Report a BUG <a href="https://github.com/ok-oldking/ok-wuthering-waves/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D">https://github.com/ok-oldking/ok-wuthering-waves/issues/new?assignees=ok-oldking&labels=bug&projects=&template=%E6%8A%A5%E5%91%8Abug-.md&title=%5BBUG%5D</></p>\n <p>QQ群:<a href="https://qm.qq.com/q/qMezq2IDGU">970523295</a></p>\n <p>QQ频道:<a href="https://pd.qq.com/s/75758wrmp">OK-WW</a></p>\n <p style="color:red;">\n <strong>本软件是免费开源的。</strong> 如果你被收费,请立即退款。请访问QQ频道或GitHub下载最新的官方版本。\n </p>\n <p style="color:red;">\n <strong>本软件仅供个人使用,用于学习Python编程、计算机视觉、UI自动化等。</strong> 请勿将其用于任何营利性或商业用途。\n </p>\n <p style="color:red;">\n <strong>使用本软件可能会导致账号被封。</strong> 请在了解风险后再使用。\n </p>\n', 'supported_screen_ratio': '16:9', 'screenshots_folder': 'screenshots', 'gui_title': 'OK-WW', 'log_file': 'logs/ok-script.log', 'error_log_file': 'logs/ok-script_error.log', 'version': 'v5.0.11', 'onetime_tasks': [<class 'src.task.FarmEchoTask.FarmEchoTask'>, <class 'src.task.FarmWorldBossTask.FarmWorldBossTask'>], 'trigger_tasks': [<class 'src.task.AutoCombatTask.AutoCombatTask'>, <class 'src.task.SkipDialogTask.AutoDialogTask'>, <class 'src.task.AutoPickTask.AutoPickTask'>]} 2024-07-23 20:30:10,563 DEBUG MainThread FeatureSet:Loading features from D:\Program Files\python3.11.0\Lib\site-packages\assets\_annotations.coco.json 2024-07-23 20:30:10,565 DEBUG MainThread Config:init self.config = {'Echo Key': 'q', 'Liberation Key': 'r', 'Resonance Key': 'e'} 2024-07-23 20:30:10,566 DEBUG MainThread Config:init self.config = {'_enabled': False} 2024-07-23 20:30:10,566 DEBUG MainThread Config:init self.config = {'_enabled': False} 2024-07-23 20:30:10,566 DEBUG MainThread Config:init self.config = {'_enabled': False} 2024-07-23 20:30:10,567 DEBUG MainThread Config:init self.config = {'Level': 5, 'Repeat Farm Count': 100, 'Entrance Direction': 'Backward'} 2024-07-23 20:30:10,567 DEBUG MainThread Config:init self.config = {'Boss1': 'Feilian Beringal', 'Boss2': 'N/A', 'Boss3': 'N/A', 'Repeat Farm Count': 1000} 2024-07-23 20:30:10,568 INFO TaskExecutor TaskExecutor:start execute 2024-07-23 20:30:10,568 INFO TaskExecutor TaskExecutor:executor is paused sleep 2024-07-23 20:30:11,958 INFO MainThread MainWindow:main window __init__ 2024-07-23 20:30:11,958 DEBUG MainThread Config:init self.config = {'last_version': 'v0.0.11'} 2024-07-23 20:30:12,098 DEBUG MainThread StartTab:update_capture 2024-07-23 20:30:12,099 DEBUG MainThread StartTab:device_index_changed 0 2024-07-23 20:30:12,099 DEBUG MainThread DeviceManager:set_preferred_device None 0 2024-07-23 20:30:12,099 DEBUG MainThread DeviceManager:preferred device: {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'} 2024-07-23 20:30:12,099 DEBUG MainThread StartTab:device_index_changed done 0 2024-07-23 20:30:12,100 DEBUG MainThread StartTab:capture_index_changed 0 {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'} 2024-07-23 20:30:12,100 DEBUG MainThread DeviceManager:calling refresh 2024-07-23 20:30:12,100 DEBUG MainThread StartTab:update_window_list 0 2024-07-23 20:30:12,130 DEBUG RefreshAdb HwndWindow:update_frame_size:0x0 to 0x0 2024-07-23 20:30:12,135 INFO RefreshAdb HwndWindow:found hwnd 197204 D:\Wuthering Waves\Wuthering Waves Game\Client\Binaries\Win64\Client-Win64-Shipping.exe UnrealWindow real:0,0,0,0 2024-07-23 20:30:12,136 DEBUG RefreshAdb WindowsGraphicsCaptureMethod:check available WINDOWS_BUILD_NUMBER:19045 >= 17134 True 2024-07-23 20:30:12,136 ERROR MainThread App:install translations error for zh_CN Traceback (most recent call last): File "D:\Program Files\python3.11.0\Lib\site-packages\ok\gui\App.py", line 88, in tr self.po_translation = get_translations(self.locale.name()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\site-packages\ok\gui\i18n\GettextTranslator.py", line 70, in get_translations return gettext.translation('ok', dir_i18n, languages=[language]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\gettext.py", line 516, in translation raise FileNotFoundError(ENOENT, FileNotFoundError: [Errno 2] No translation file found for domain: 'ok' 2024-07-23 20:30:12,136 DEBUG RefreshAdb WindowsCaptureFactory:try BitBlt method {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True} title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False current_type:<class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:12,138 INFO RefreshAdb DeviceManager:capture method <class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:12,139 DEBUG RefreshAdb BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:12,140 DEBUG RefreshAdb DeviceManager:refresh {'pc': {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'}} 2024-07-23 20:30:12,270 DEBUG MainThread Config:init self.config = {'target_task': 'FarmWorldBossTask', 'target_images': ['D:/srxm/ok-wuthering-waves/screenshots/BitBltCaptureMethod_1600x900_title_None_Client-Win64-Shipping.exe_1600x900_197204_1_False_original.png'], 'target_function': ''} 2024-07-23 20:30:12,271 DEBUG MainThread Config:init self.config = {'width': 800, 'height': 300, 'x': 7, 'y': 36, 'keyword': '', 'level': 'ALL', 'show': False} 2024-07-23 20:30:12,314 DEBUG DebugTab DebugTab:bind_hot_keys 2024-07-23 20:30:12,400 INFO MainThread MainWindow:first run show about tab last version:v0.0.11 2024-07-23 20:30:12,402 INFO MainThread MainWindow:main window __init__ done 2024-07-23 20:30:12,531 DEBUG MainThread App:show_main_window end 2024-07-23 20:30:12,532 DEBUG MainThread OK:start app.exec() 2024-07-23 20:30:12,539 DEBUG MainThread StartTab:update_capture 2024-07-23 20:30:20,436 DEBUG ok.gui.StartController HwndWindow:update_frame_size:0x0 to 0x0 2024-07-23 20:30:20,438 INFO ok.gui.StartController HwndWindow:found hwnd 197204 D:\Wuthering Waves\Wuthering Waves Game\Client\Binaries\Win64\Client-Win64-Shipping.exe UnrealWindow real:0,0,0,0 2024-07-23 20:30:20,439 DEBUG ok.gui.StartController WindowsGraphicsCaptureMethod:check available WINDOWS_BUILD_NUMBER:19045 >= 17134 True 2024-07-23 20:30:20,439 DEBUG ok.gui.StartController WindowsCaptureFactory:try BitBlt method {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True} title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False current_type:<class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:20,439 INFO ok.gui.StartController DeviceManager:capture method <class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:20,439 DEBUG ok.gui.StartController BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:20,440 DEBUG ok.gui.StartController DeviceManager:refresh {'pc': {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'}} 2024-07-23 20:30:20,440 DEBUG MainThread StartTab:update_capture 2024-07-23 20:30:20,440 DEBUG ok.gui.StartController BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:20,440 INFO ok.gui.StartController StartController:start checking for hdr and night light 2024-07-23 20:30:20,448 INFO ok.gui.StartController display:is_night_light_enabled is False 2024-07-23 20:30:20,736 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:25,359 INFO update_window_size HwndWindow:do_update_window_size changed,visible:True x:1 y:58 window:2560x1440 self.window:2584x1504 real:0x0 2024-07-23 20:30:25,361 DEBUG MainThread OverlayWindow:update_overlay: True, 1, 58, 2560, 1440, 1.75 2024-07-23 20:30:25,365 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_True 2024-07-23 20:30:26,963 INFO update_window_size HwndWindow:do_update_window_size changed,visible:False x:1 y:58 window:2560x1440 self.window:2584x1504 real:0x0 2024-07-23 20:30:26,973 DEBUG MainThread OverlayWindow:update_overlay: False, 1, 58, 2560, 1440, 1.75 2024-07-23 20:30:26,975 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:30,562 DEBUG ok.firebase.Analytics Config:init self.config = {'client_id': 'b0fabc3624f420b8c388aecf18b39e7c'} 2024-07-23 20:30:32,130 INFO ok.firebase.Analytics Analytics:send report {'device_id': 'b0fabc3624f420b8c388aecf18b39e7c', 'app_version': 'v5.0.11', 'app_name': 'OK-WW', 'locale': 'zh_CN', 'sr': '3840x2160', 'os': 'windows', 'os_version': '10', 'os_build': '19045', 'cpu': 'Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz', 'memory': '31', 'gpu': 'NVIDIA GeForce RTX 3060 Ti', 'device': 'pc', 'device_capture': 'windows', 'device_sr': '2560x1440'} 2024-07-23 20:30:33,231 DEBUG ok.gui.StartController HwndWindow:update_frame_size:0x0 to 0x0 2024-07-23 20:30:33,258 INFO ok.gui.StartController HwndWindow:found hwnd 197204 D:\Wuthering Waves\Wuthering Waves Game\Client\Binaries\Win64\Client-Win64-Shipping.exe UnrealWindow real:0,0,0,0 2024-07-23 20:30:33,258 DEBUG ok.gui.StartController WindowsGraphicsCaptureMethod:check available WINDOWS_BUILD_NUMBER:19045 >= 17134 True 2024-07-23 20:30:33,259 DEBUG ok.gui.StartController WindowsCaptureFactory:try BitBlt method {'exe': 'Client-Win64-Shipping.exe', 'calculate_pc_exe_path': <function calculate_pc_exe_path at 0x00000137073DADE0>, 'interaction': 'PostMessage', 'can_bit_blt': True, 'bit_blt_render_full': True, 'check_hdr_and_night_light': True} title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False current_type:<class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:33,260 INFO ok.gui.StartController DeviceManager:capture method <class 'ok.capture.windows.BitBltCaptureMethod.BitBltCaptureMethod'> 2024-07-23 20:30:33,260 DEBUG ok.gui.StartController BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,261 DEBUG ok.gui.StartController DeviceManager:refresh {'pc': {'address': '', 'imei': 'pc', 'device': 'windows', 'model': '', 'nick': '鸣潮 ', 'width': 0, 'height': 0, 'hwnd': '鸣潮 ', 'capture': 'windows', 'connected': 1, 'full_path': 'D:\\Wuthering Waves\\Wuthering Waves Game\\Client\\Binaries\\Win64\\Client-Win64-Shipping.exe'}} 2024-07-23 20:30:33,262 DEBUG ok.gui.StartController BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,262 INFO ok.gui.StartController StartController:start checking for hdr and night light 2024-07-23 20:30:33,263 INFO ok.gui.StartController display:is_night_light_enabled is False 2024-07-23 20:30:33,287 DEBUG MainThread StartTab:update_capture 2024-07-23 20:30:33,572 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,575 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,805 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,870 INFO TaskExecutor FeatureSet:FeatureSet: Width and height changed from 0x0 to 2560x1440 2024-07-23 20:30:33,872 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:33,877 ERROR TaskExecutor TaskExecutor:Farm World Boss(Must Drop a WayPoint on the Boss First) exception Traceback (most recent call last): File "D:\Program Files\python3.11.0\Lib\site-packages\ok\task\TaskExecutor.py", line 281, in execute self.current_task.run() File "D:\srxm\ok-wuthering-waves\src\task\FarmWorldBossTask.py", line 152, in run if not self.check_main(): ^^^^^^^^^^^^^^^^^ File "D:\srxm\ok-wuthering-waves\src\task\FarmWorldBossTask.py", line 111, in check_main if not self.in_team()[0]: ^^^^^^^^^^^^^^ File "D:\srxm\ok-wuthering-waves\src\task\BaseCombatTask.py", line 310, in in_team c1 = self.find_one('char_1_text', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FindFeature.py", line 75, in find_one boxes = self.find_feature(feature_name, horizontal_variance, vertical_variance, threshold, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FindFeature.py", line 19, in find_feature return self.feature_set.find_feature(self.executor.frame, feature_name, horizontal_variance, vertical_variance, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FeatureSet.py", line 136, in find_feature self.check_size(mat) File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FeatureSet.py", line 59, in check_size self.process_data() File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FeatureSet.py", line 71, in process_data self.feature_dict, self.box_dict, compressed = read_from_json(self.coco_json, self.width, self.height) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python3.11.0\Lib\site-packages\ok\feature\FeatureSet.py", line 231, in read_from_json with open(coco_json, 'r') as file: ^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Program Files\\python3.11.0\\Lib\\site-packages\\assets\\_annotations.coco.json' 2024-07-23 20:30:33,880 DEBUG MainThread BaseWindowsCaptureMethod:check connected title_None_Client-Win64-Shipping.exe_2560x1440_197204_1_False 2024-07-23 20:30:51,123 ERROR ok.firebase.Analytics Analytics:Failed to send event: 502 - 2024-07-23 20:31:00,563 INFO Updater Updater:do_check_for_updates: https://api.github.com/repos/ok-oldking/ok-wuthering-waves/releases?per_page=15 2024-07-23 20:31:01,354 INFO Updater Updater:check update newest version clear update folder D:\srxm\ok-wuthering-waves\updates
看看working dir是不是项目根目录
@ok-oldking os.path.abspath(__file__) 获取的是这个path文件的绝对路径, path又是ok模块里面的
os.path.abspath(__file__)
path
应该是有点问题 你先试试两个项目都checkout下来吧, 用软链接过去. pip装的可能读asset目录有点问题, 我晚点再看看
改好了 pip 更新ok到 0.0.132
描述错误: debug启动后, 执行任务报错, 文件目录获取错误, 获取到python版本目录
Lib\\site-packages
中去了复现步骤 按照以下步骤复现行为:
截图 : 如果适用,添加截图以帮助解释您的问题。
脚本软件版本: 0.1.21
windows操作系统: Windows 10
模拟器版本: pc鸣潮
上传日志: