pywavefront / PyWavefront

Python library for importing Wavefront .obj files
BSD 3-Clause "New" or "Revised" License
312 stars 80 forks source link

PywavefrontException: Unimplemented OBJ format statement #114

Closed morawi closed 4 years ago

morawi commented 4 years ago

I can read this OBJ file with Windows 3D viewer, yet, I am having this error:

PywavefrontException: Unimplemented OBJ format statement 'g' on line 'g Tshirt'

Python 3.7 pywavefront.version Out[12]: '1.3.2'

Any ideas?

einarf commented 4 years ago

It's just a warning. I need to hide those mesages by default. We don't support groups, but your object should load just fine.

morawi commented 4 years ago

I am not able to parse:

obj_3D.parse() Traceback (most recent call last):

File "", line 1, in obj_3D.parse()

File "C:\ProgramData\Anaconda3\lib\site-packages\pywavefront\wavefront.py", line 84, in parse self.parser.parse()

File "C:\ProgramData\Anaconda3\lib\site-packages\pywavefront\obj.py", line 90, in parse super(ObjParser, self).parse()

File "C:\ProgramData\Anaconda3\lib\site-packages\pywavefront\parser.py", line 129, in parse self.dispatcher.get(self.values[0], self.parse_fallback)()

File "C:\ProgramData\Anaconda3\lib\site-packages\pywavefront\parser.py", line 47, in inner func(*args, **kwargs)

File "C:\ProgramData\Anaconda3\lib\site-packages\pywavefront\parser.py", line 145, in parse_fallback % (self.values[0], self.line.rstrip()))

PywavefrontException: Unimplemented OBJ format statement 'g' on line 'g Tshirt'

einarf commented 4 years ago

Don't use strict mode when loading the object https://github.com/pywavefront/PyWavefront/blob/caa2013d7026dd484ac8c5ca8273f2d680196130/pywavefront/parser.py#L143-L148

einarf commented 4 years ago

Closing this for now. Please reopen or create new issue if you have any more questions or issues.