Im using pyame to load the .obj files which are 3d files.
Im using this module: http://www.pygame.org/wiki/OBJFileLoader
But at fixing some errors from python2 to python 3 and then running there is another BIG error:
Code: Alles auswählen
Traceback (most recent call last):
File "D:\Python33\lib\site-packages\OpenGL\latebind.py", line 41, in __call__
return self._finalCall( *args, **named )
TypeError: 'NoneType' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Martin\Desktop\3d.py", line 31, in <module>
obj = OBJ(sys.argv[1], swapyz=True)
File "C:\Users\Martin\Desktop\objloader.py", line 97, in __init__
glNormal3fv(self.normals[normals[i] - 1])
File "D:\Python33\lib\site-packages\OpenGL\latebind.py", line 45, in __call__
return self._finalCall( *args, **named )
File "D:\Python33\lib\site-packages\OpenGL\wrapper.py", line 571, in wrapperCa
ll
pyArgs = tuple( calculate_pyArgs( args ))
File "D:\Python33\lib\site-packages\OpenGL\wrapper.py", line 356, in calculate
_pyArgs
yield converter(args[index], self, args)
File "D:\Python33\lib\site-packages\OpenGL\arrays\arrayhelpers.py", line 113,
in asArraySize
result = handler.asArray( incoming, dataType )
File "D:\Python33\lib\site-packages\OpenGL\arrays\lists.py", line 138, in asAr
ray
for item in value
File "D:\Python33\lib\site-packages\OpenGL\arrays\lists.py", line 138, in <lis
tcomp>
for item in value
File "D:\Python33\lib\site-packages\OpenGL\arrays\lists.py", line 148, in asAr
ray
return arrayType( value )
TypeError: ('a float is required', <function asArrayTypeSize.<locals>.asArraySiz
e at 0x02FE6108>)