View Full Version : Type Error when using opengl in python

10-29-2017, 06:33 AM
I got an error that writes:
TypeError:must be int or slice,not VAO
In python while using opengl.
I am not sure which line causes the error. Just wanted to know what could have cause this.I know this is a python problem,not opengl,but I hope you can help me,because it contains opengl codes.

Dark Photon
10-30-2017, 06:38 AM
This isn't really an OpenGL question, but your error suggests a problem indexing into a list or container in your app, where a VAO is provided instead of a valid index (or slice):

Python slice how-to, I know the Python slice but how can I use built-in slice object for it? (https://stackoverflow.com/questions/3911483/python-slice-how-to-i-know-the-python-slice-but-how-can-i-use-built-in-slice-ob/3911763)

e.g. list[ vao ] instead of list[ 1 ] or list[ 0..2 ].