lab11/eagle

Eagle Renumber Script fails with error unorderable types

Closed this issue · 2 comments

When I run the renumber script on debug backplane with prefix "L" it fails with the error:

File "/home/adkins/Research/eagle/scripts/eagle_renumber.py", line 165, in
parts = collections.OrderedDict(sorted(parts.items(), key=lambda t: resolve_unit(*t[0])))
TypeError: unorderable types: str() < float()

Have you figured this out yet?

I was getting the same error tonight from a part with the value DNP and I edited the script to handle them.

Josh's underlying issue is that he did not assign a value to a part type that expected a user value, L1:

<deviceset name="FERRITE_BEAD" prefix="L" uservalue="yes">
<part name="L1" library="passives" deviceset="FERRITE_BEAD" device="0603"/>
<part name="L2" library="signpost" deviceset="LHQ3NP" device="" value="22uH"/>

If there's no value, the value field falls back to the deviceset key to try to group things. The result is that there's a mixture of numeric values (22uH) and string-y values (FERRITE_BEAD) for the L prefix.

I can add something to catch this an print a more informative error.