Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 请在这里简要描述BUG,否则该Issue将直接关闭 #764

Open
Osiris8571 opened this issue Nov 19, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Osiris8571
Copy link

问题描述

Windows 11 家庭中文版22H2 代码不兼容系统导致无法正常运行

预期行为

运行

实际行为

代码报错

截图或录屏


Traceback (most recent call last):
File "C:\handgame\StarRailAssistant-1.8.7\Honkai_Star_Rail.py", line 376, in
select() if not serial_map else sra.main(start=serial_map)
^^^^^^^^
File "C:\handgame\StarRailAssistant-1.8.7\Honkai_Star_Rail.py", line 372, in select
is_loop = sra.main(option)
^^^^^^^^^^^^^^^^
File "C:\handgame\StarRailAssistant-1.8.7\Honkai_Star_Rail.py", line 318, in main
map_instance = map_word(game_title)
^^^^^^^^^^^^^^^^^^^^
File "C:\handgame\StarRailAssistant-1.8.7\utils\map.py", line 22, in init
self.calculated = calculated(title)
^^^^^^^^^^^^^^^^^
File "C:\handgame\StarRailAssistant-1.8.7\utils\calculated.py", line 61, in init
self.number_ocr = CnOcr(det_model_name=det_model_name, rec_model_name="en_number_mobile_v2.0", det_root=det_root, rec_root=rec_root, cand_alphabet='0123456789.+%')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\cnocr\cn_ocr.py", line 155, in init
self.rec_model = rec_cls(
^^^^^^^^
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\cnocr\ppocr\pp_recognizer.py", line 87, in init
) = create_predictor(self._model_fp, 'rec', logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\cnocr\ppocr\utility.py", line 168, in create_predictor
sess = ort.InferenceSession(model_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 432, in init
raise e
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "C:\Users\daiwe\AppData\Local\Programs\Python\Python311\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 451, in _create_inference_session
raise ValueError(
ValueError: This ORT build has ['AzureExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['AzureExecutionProvider', 'CPUExecutionProvider'], ...)
B~TSVSUB`T_{N@(J{%03U_0

自动锄大地脚本版本

1.8.7

星穹铁道区服

国服

运行的客户端

PC

日志

日志文件.log

@Osiris8571 Osiris8571 added the bug Something isn't working label Nov 19, 2023
@weiduhuo
Copy link
Contributor

weiduhuo commented Nov 19, 2023

将cnocr模块更新至>=2.2.4,可以解决上述bug。这是因为你的onnxruntime版本太新导致的

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

No branches or pull requests

2 participants