You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting this unfortunate error handling, @hyphz. I'm really sorry for you not receiving any feed-back about this issue for more than a year. That is not intentional, but is probably because the contributors to this project are only able to spend their spare time working with this, and there might be long periods without anyone reading new issues. Then some issues might slip through without any answer when trying to catch up after a low-activity period.
This is easy to reproduce with e.g. this input using Ubuntu 18.04.4 LTS and WSL1 in Windows 10, Pyhon 3.7.5, and WireViz v0.2, v0.3.2, or the current v0.4-dev:
The result was IndexError: list index out of range from a complex expression in the create_graph function.
I also tested a bad connector pin index by only changing the connection part of the input to this:
connections:
- - W1: 2
- X1: 3
The result was Exception: X1:3 not found. from the connect function which is easier to understand, but could also be improved further by e.g. this instead: Exception: In connection 1, pin X1:3 not found
The same connect function should also test for an unknown wire index (called via_wire inside the function) at the end of the block with the leading comment # check via cable similar to what is done in the block # check from and to connectors just above. At this moment, this is found at lines 47-83 of Harness.py in the current dev branch, but this link might get invalid when the dev branch evolve with new commits in the future.
Error message improvements like this are also discussed in the related issue #207.
This should instead be detected as an error at load time.
The text was updated successfully, but these errors were encountered: