-
Notifications
You must be signed in to change notification settings - Fork 247
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
list index out of range while generating bom #15
Comments
look at openscad.log file in current directory.Does it looks like this? Compiling library `/home/seva/src/Mendel90/scad/main.scad'. Compiling library `/home/seva/src/Mendel90/scad/z-limit-switch-bracket.scad'. Compiling library `/home/seva/src/Mendel90/scad/x-carriage.scad'. ... Compiling library `/home/seva/src/Mendel90/scad/d-motor_bracket.scad'. Compiling library `/home/seva/src/Mendel90/scad/ribbon_clamp.scad'. Compiling library `/home/seva/src/Mendel90/scad/pulley.scad'. ECHO: "machine_assembly/" ECHO: "bed_fan_assembly/" ECHO: "FAN8038: Fan 80 x 38" ECHO: "WA4099: Washer M4 x 9 x 0.9" .... ECHO: "CS03016: M3 cap screw x 16" ECHO: "KY240W12L: PSU e.g. KY240W12L" ECHO: "/electronics_assembly" ECHO: "x_axis_assembly/" ECHO: "RD16494: Smooth rod 16 x 494" ... |
I pushed a fix but I think that bug only occurs if there is a part outside of any assembly. Since everything should be inside the machine assembly that should not happen, and indeed it does not on my PC. Please try the fix and compare the generated BOM with the one on GitHub. |
Try to run it with this patch and look at last line before traceback --- a/bom.py
+++ b/bom.py
@@ -106,6 +106,7 @@ def boms(machine):
for line in open("openscad.log"):
if line[:7] == 'ECHO: "':
s = line[7:-2]
+ print "line:", s
if s[-1] == '/':
ass = s[:-1]
if stack: |
I think the problem might be in my openscad version, sorry for saying the stls built ok, I don't think /all/ of them did, the last bit of openscad.log is: CGAL Cache insert: multmatrix([[0.913545,2.49046e-17,-0.406 (124 verts) I'm trying the latest git and sevikkk's patch, this slow netbook will take a while to check, and meanwhile I'll get the latest openscad |
The stls build fine, but I get this error when the bom gets generated. This is using today's git (3554174) but I've had it before, and have never successfully built a bom. This is an untouched repo, no changes to configuration files.
./make_machine.py mendel
Generating bom ...
Traceback (most recent call last):
File "./make_machine.py", line 17, in
make_machine(sys.argv[1])
File "./make_machine.py", line 10, in make_machine
boms(machine)
File "/home/james/Mendel90/bom.py", line 122, in boms
main.assemblies[stack[-1]].add_part(s)
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: