pygame objloader error

Hier werden alle anderen GUI-Toolkits sowie Spezial-Toolkits wie Spiele-Engines behandelt.
Antworten
nitram0598
User
Beiträge: 41
Registriert: Dienstag 24. September 2013, 14:53

Hello!
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>)
Please help me, thanks
BlackJack

@nitram0598: So you've ported a module to Python 3 of which we don't know if the problem is in the module itself or in the changes you've made for porting, or due to changes in Python 3, or changes in the OpenGL bindings between Python 2 and 3. :-)

Or maybe it is even a problem in the OBJ-File.

Have you testet it with Python 2 if it works there?
nitram0598
User
Beiträge: 41
Registriert: Dienstag 24. September 2013, 14:53

i dont have python 2, ca you test please?
Antworten