PyWavefront icon indicating copy to clipboard operation
PyWavefront copied to clipboard

Bug: Report throw `IndexError: list index out of range` when the face line is not the same

Open Matt-V50 opened this issue 2 years ago • 2 comments

Reproduce

usemtl plane678
f 480/3598 489/3597 477/3599
f 115 1049 116
f 116 1049 128
f 1040 125 127

Exception

Traceback (most recent call last):
  File "..\lib\site-packages\pywavefront\parser.py", line 129, in parse
    self.dispatcher.get(self.values[0], self.parse_fallback)()
  File "..\lib\site-packages\pywavefront\obj.py", line 274, in parse_f
    self.material.vertices += list(consumed_vertices)
  File "..\lib\site-packages\pywavefront\obj.py", line 384, in consume_faces
    t_index = (int(parts[1]) - 1) if has_vt else None
IndexError: list index out of range

Here parts = 115

Matt-V50 avatar May 16 '22 06:05 Matt-V50

What tool created this file? Never seen face definitions change like this before.

einarf avatar May 16 '22 19:05 einarf

@einarf We write it with our own code, but meshlab could render it correctly

Matt-V50 avatar May 17 '22 13:05 Matt-V50