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

Не запускает файл miniKarta #40

Open
MysticPoint opened this issue Jun 20, 2024 · 3 comments
Open

Не запускает файл miniKarta #40

MysticPoint opened this issue Jun 20, 2024 · 3 comments

Comments

@MysticPoint
Copy link

Делал все действия точно по инструкции.
Выдаёт ошибку:

Traceback (most recent call last):
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 49, in create
model = DetectMultiBackend(path, device=device, fuse=autoshape) # detection model
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\models\common.py", line 367, in init
import onnxruntime
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init
.py", line 57, in
raise import_capi_exception
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init_.py", line 23, in
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi_pybind_state.py", line 32, in
from .onnxruntime_pybind11_state import * # noqa
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 60, in _create
model = attempt_load(path, device=device, fuse=False) # arbitrary model
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\models\experimental.py", line 79, in attempt_load
ckpt = torch.load(attempt_download(w), map_location='cpu') # load
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 1262, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x08'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\miniKarta.py", line 74, in
model = torch.hub.load('code/yolo5', 'custom', 'code/yolo5/best.onnx', source='local')#classes="1"
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\hub.py", line 568, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\hub.py", line 597, in _load_local
model = entry(*args, **kwargs)
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 83, in custom
return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
File "C:\Users\mysti\OneDrive\Рабочий стол\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 78, in _create
raise Exception(s) from e
Exception: invalid load key, '\x08'.. Cache may be out of date, try force_reload=True or see ultralytics/yolov5#36 for help.

@1Lucky1
Copy link

1Lucky1 commented Jun 21, 2024

Это потому что у тебя файл лежит по пути с папкой, названной кириллицей. "рабочий стол". Перемести туда, где в названиях папок только английскией буквы

@MysticPoint
Copy link
Author

Это потому что у тебя файл лежит по пути с папкой, названной кириллицей. "рабочий стол". Перемести туда, где в названиях папок только английскией буквы

Traceback (most recent call last):
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 49, in create
model = DetectMultiBackend(path, device=device, fuse=autoshape) # detection model
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\models\common.py", line 367, in init
import onnxruntime
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init
.py", line 57, in
raise import_capi_exception
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init_.py", line 23, in
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi_pybind_state.py", line 32, in
from .onnxruntime_pybind11_state import * # noqa
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 60, in _create
model = attempt_load(path, device=device, fuse=False) # arbitrary model
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\models\experimental.py", line 79, in attempt_load
ckpt = torch.load(attempt_download(w), map_location='cpu') # load
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 1262, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x08'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\miniKarta.py", line 74, in
model = torch.hub.load('code/yolo5', 'custom', 'code/yolo5/best.onnx', source='local')#classes="1"
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\hub.py", line 568, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File "C:\Users\mysti\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\hub.py", line 597, in _load_local
model = entry(*args, **kwargs)
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 83, in custom
return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
File "C:\Games\WarThunder_Map_Marker_Finder-main\distance\code/yolo5\hubconf.py", line 78, in _create
raise Exception(s) from e
Exception: invalid load key, '\x08'.. Cache may be out of date, try force_reload=True or see ultralytics/yolov5#36 for help.

Полностью всё переустановил используя другую папку, не помогло

@SkyDeathLine
Copy link

SkyDeathLine commented Jun 25, 2024

Здравствуйте, столкнулся с похожей проблемой. Выполнял по инструкции, прочитал что должно быть написано "программа предусматривает сочетание клавиш", но вместо этого консоль показывала вот это(это не все, только то, что успел заскринить в конце). Соответственно оверлей с масштабом из settings.py открыть я не смог
image-6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants