fogleman / pg

Python OpenGL Graphics Framework

Home Page:http://pg.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fonts throw exception though all other examples work

kbrafford opened this issue · comments

commented

(venv)miniserver:pg keith$ python main.py 6
Traceback (most recent call last):
File "main.py", line 63, in
main()
File "main.py", line 59, in main
app.run()
File "/Users/keith/pg/pg/core.py", line 372, in run
self.tick()
File "/Users/keith/pg/pg/core.py", line 377, in tick
window.tick()
File "/Users/keith/pg/pg/core.py", line 461, in tick
self.call('draw')
File "/Users/keith/pg/pg/core.py", line 479, in call
getattr(listener, name)(_args, *_kwargs)
File "/Users/keith/pg/examples/font.py", line 10, in draw
self.font.render('Hello, world!', (w / 2, h / 2), (0.5, 0.5))
File "/Users/keith/pg/pg/font.py", line 37, in render
vertex_buffer.delete()
File "/Users/keith/pg/pg/core.py", line 103, in delete
glDeleteBuffers(1, self.handle)
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/latebind.py", line 45, in call
return self._finalCall( _args, *_named )
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/wrapper.py", line 570, in wrapperCall
pyArgs = tuple( calculate_pyArgs( args ))
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/wrapper.py", line 355, in calculate_pyArgs
yield converter(args[index], self, args)
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/converters.py", line 134, in call
return self.function( incoming )
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/arrays/arraydatatype.py", line 141, in asArray
return cls.getHandler(value).asArray( value, typeCode or cls.typeConstant )
File "/Users/keith/GitHub/sandbox/venv/lib/python2.7/site-packages/OpenGL/arrays/arraydatatype.py", line 52, in call
typ, repr(value)[:50]
TypeError: ("No array-type handler for type <type 'numpy.uint32'> (value: 1) registered", <OpenGL.converters.CallFuncPyConverter object at 0x106155050>)
(venv)miniserver:pg keith$

This happens if numpy is installed. PyOpenGL bug? Run in a virtualenv that does not have numpy, or uninstall numpy.

commented

Correct. I "pip uninstall numpy" in that venv and the font demo runs properly.