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

ksuToolsPushMoved failes based on the value field #244

Open
jbayer05 opened this issue Jan 16, 2025 · 2 comments
Open

ksuToolsPushMoved failes based on the value field #244

jbayer05 opened this issue Jan 16, 2025 · 2 comments

Comments

@jbayer05
Copy link

Hello,

I have no deep understanding of the code therefore I can just report what I found - but unfortunately I have not a solution.
I stumbled over an issue which leads to an Python-Error in push3D2pcb:
At line 21822 a check is performed "if ('at' in ln)" which wrongfully resolves true in the case a component has 'at' in its value.

In the attached example board, I have an LED with value 'Status' which triggers the if and then the "ln.index(') ')" fails with "substring not found".
After renaming the LED-Value to something else (which does not contain 'at'), the position-push works as expected.
As this check appears at other places in the code, I assume there could be other issues.

In order to reproduce the issue:

  • load the attached Status-LED.kicad_pcb.zip (KiCAD v8.0.7) with KiCadStepUp
  • select the LED
  • use the "ksu Push 3D moved model(s) to PCB" tool
  • select the "Status-LED.kicad_pcb"

thanks a lot for the extremely useful workbench!

@easyw
Copy link
Owner

easyw commented Jan 16, 2025

hi @jbayer05
thanks for your detailed feedback...
I've pushed some code 05ca2b7 to make the parser a bit more robust...
Please have a try.

@jbayer05
Copy link
Author

Hi @easyw,

thanks for the quick fix - works for me.
Of course you can still fool it by changing the value accordingly (e.g. "St(atus") - but of course this is much more unlikely now ;-)

Greetings

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

2 participants