Skip to content

Saving failes when subsheets are in subdirectory #13

@benrogmans

Description

@benrogmans

It fails to save because the sheet can't be found. The reason is the the subsheet is actually located in my-project\sheets\subsheet.kicad_sch:

03-30 13:07:36 com_github_MitjaNemec_SaveRestoreLayout.action_save_restore_layout 172:Plugin executed on: 'win32'
03-30 13:07:36 com_github_MitjaNemec_SaveRestoreLayout.action_save_restore_layout 173:Plugin executed with python version: '3.9.14 (main, Feb 13 2023, 04:48:26) [MSC v.1934 64 bit (AMD64)]'
03-30 13:07:36 com_github_MitjaNemec_SaveRestoreLayout.action_save_restore_layout 174:KiCad build version: 7.0.1
03-30 13:07:36 com_github_MitjaNemec_SaveRestoreLayout.action_save_restore_layout 175:Plugin version: 2.0.6

03-30 13:07:52 com_github_MitjaNemec_SaveRestoreLayout.action_save_restore_layout 259:Fatal error running SaveLayout
Traceback (most recent call last):
  File "C:\Users\ben\Documents\KiCad\7.0\3rdparty\plugins\com_github_MitjaNemec_SaveRestoreLayout\action_save_restore_layout.py", line 252, in Run
    save_layout.save_layout(save_layout.src_anchor_fp.sheet_id[0:selected_level + 1], data_file,
  File "C:\Users\ben\Documents\KiCad\7.0\3rdparty\plugins\com_github_MitjaNemec_SaveRestoreLayout\save_restore_layout.py", line 385, in save_layout
    md5hash = get_sch_hash(file_path, md5hash)
  File "C:\Users\ben\Documents\KiCad\7.0\3rdparty\plugins\com_github_MitjaNemec_SaveRestoreLayout\save_restore_layout.py", line 65, in get_sch_hash
    with open(sch_file, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ben\\Documents\\my-project\\subsheet.kicad_sch'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions