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

Ошибка, если в skls-браузере не указать файл #624

Closed
PavelBlend opened this issue Apr 23, 2023 · 1 comment
Labels
bug Что-то не работает

Comments

@PavelBlend
Copy link
Owner

Если не выбрать файл в skls браузере или указать несуществующий файл и нажать Open .skls file, то аддон выдаст ошибку:

Traceback (most recent call last):
  File "C:\Users\Pavel\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_xray\ops\skls_browser.py", line 181, in execute
    init_skls_browser(self, context, self.filepath)
  File "C:\Users\Pavel\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_xray\utils\__init__.py", line 77, in wrapper
    result = method(self, context, *args)
  File "C:\Users\Pavel\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_xray\ops\skls_browser.py", line 85, in init_skls_browser
    skls = SklsFile(file_path=filepath)
  File "C:\Users\Pavel\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_xray\ops\skls_browser.py", line 125, in __init__
    file_data = rw.utils.read_file(file_path)
  File "C:\Users\Pavel\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\io_scene_xray\rw\utils.py", line 25, in read_file
    raise log.AppError('No such file!')
io_scene_xray.log.AppError: No such file!

Нужно обрабатывать такой случай и показывать читаемое предупреждение.

@PavelBlend PavelBlend added the bug Что-то не работает label Apr 23, 2023
@PavelBlend
Copy link
Owner Author

Теперь будут отображаться такие предупреждения:
01
02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Что-то не работает
Projects
None yet
Development

No branches or pull requests

1 participant