Reputation: 3358
am converting my .obj model into three.js json with the use of python converter given in the three.js, i have installed python and i can run the simple python program, if i try to convert my .obj to .js am getting following error
D:\xampp\htdocs\3d-viewer\documents\mrdoob-three.js-d3cb4e7\utils\converters\obj
>convert_obj_three.py -i male02.obj -o male02.js
Converting [male02.obj] into [male02.js] ...
Traceback (most recent call last):
File "D:\xampp\htdocs\3d-viewer\documents\mrdoob-three.js-d3cb4e7\utils\conver
ters\obj\convert_obj_three.py", line 1581, in <module>
convert_ascii(infile, morphfiles, colorfiles, outfile)
File "D:\xampp\htdocs\3d-viewer\documents\mrdoob-three.js-d3cb4e7\utils\conver
ters\obj\convert_obj_three.py", line 1106, in convert_ascii
"faces" : ",".join(generate_face(f, fc) for f, fc in zip(faces, colorFac
es)),
File "D:\xampp\htdocs\3d-viewer\documents\mrdoob-three.js-d3cb4e7\utils\conver
ters\obj\convert_obj_three.py", line 1106, in <genexpr>
"faces" : ",".join(generate_face(f, fc) for f, fc in zip(faces, colorFac
es)),
File "D:\xampp\htdocs\3d-viewer\documents\mrdoob-three.js-d3cb4e7\utils\conver
ters\obj\convert_obj_three.py", line 665, in generate_face
for i in xrange(nVertices):
NameError: name 'xrange' is not defined
Upvotes: 0
Views: 296
Reputation: 880637
xrange
is a Python2 function which has been removed from Python3. The error
NameError: name 'xrange' is not defined
suggests you have installed Python3 while convert_obj_three.py
requires Python2.
Upvotes: 2