Unimplemented OBJ format statement 's' on line 's 1' ERROR

Viewed 1373

hi i am going to import an OBJ 3d File using Pywavefront library and Display this 3d Model on another 3d scene finally. I studied about this library and 3d Models much.

import pywavefront
import pywavefront.visualization
from pywavefront import visualization

from pywavefront import material
from pywavefront import mesh
from pywavefront import parser
import pywavefront.texture as texture 

my obj file named "low-poly-fox-by-pixelmannen" that i downloaded from Clara.io website along its MTL file and added to my pycharm Working Dir both of files. my codes for import this obj file as:

fox = pywavefront.Wavefront('low-poly-fox-by-pixelmannen.obj', collect_faces=True)

I would like to display this obj file into pycharm, but after Run, program shows ONLY a EMPTY WHITE SCREEN and says this ERROR:

Unimplemented OBJ format statement 's' on line 's 1'

Important point is: when pycharm runs and white screen appeared pycharm Thinking still and pycharm CRASH.

I am CONFUSED from Yesterday and Searched Similar errors, but I didnt find Any Solution or Comment about My problem. Please tell me what means this error? and Guide me for solve problem and Display 3d OBJ file finally.

1 Answers

It means you have a problem with the file which contains smooth shading statements (read here for more https://en.wikipedia.org/wiki/Wavefront_.obj_file). Pywavefront does not know what is it (it is not implemented in their parser as I see). So you can comment this line (# s 1), so it will not be parsed.

About visualization, I think that your problem is not with this error. According to their main parser class, it should raise an error only if you add to loader strict=True parameter (it is False by default). So I think your model is loaded w\o smooth shading, but the problem with visualization does not correspond with that error (it just warns you - logged). I can have an assumption that you do not install or import some module that provides vizualisation.

You asked this question about 2 months ago, if you find the solution, It would be nice to share it :)

Related