MitjaNemec / Kicad_action_plugins

Kicad action plugins
414 stars 62 forks source link

v6 Inconsistency between schematic and board gives error #145

Open CantBelieveThisWorks opened 2 years ago

CantBelieveThisWorks commented 2 years ago

Hello, while playing with replicate layout on v6 I encountered an error when a footprint exists on the board, but not on the schematic. I tend to add logos only on the PCB but not on the schematic. When replicate layout is run, the following error is encountered (note line numbers could be wrong, as I added some extra debug messages):

01-12 21:54:30 replicate_layout.action_replicate_layout 345:Fatal error when making an instance of replicator Traceback (most recent call last): File "C:\Users\Robert\AppData\Roaming\kicad\6.0\scripting\replicate_layout\action_replicate_layout.py", line 342, in Run replicator = replicatelayout.Replicator(board) File "C:\Users\Robert\AppData\Roaming\kicad\6.0\scripting\replicate_layout\replicatelayout.py", line 150, in init sheet_id = self.get_sheet_id_alt(fp) File "C:\Users\Robert\AppData\Roaming\kicad\6.0\scripting\replicate_layout\replicatelayout.py", line 122, in get_sheet_id_alt sheet_id = self.get_path(module).split("/")[-2] IndexError: list index out of range

When the logo is removed, everything is working again. Not sure if this is a bug or a feature, but figured I might raise this in any case. Also, thanks for writing such a great plugin!

MitjaNemec commented 2 years ago

Thanks for the report. I am in the process of refactoring/porting the plugins to V6 and integrating them in "Plugin and Content Manager". When I come to Replicate layout, I'll take care of it.