Thread: [PyOpenGL-Users] _base_glutInit( ctypes.byref(count), holder ) TypeError: 'NoneType' object is not
Brought to you by:
mcfletch
From: John L. <joh...@gm...> - 2010-01-29 22:22:19
|
Hey Guys!, Does anyone know what the fix for the following error is: C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import lesson5.py Hit ESC key to quit. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "lesson5.py", line 240, in <module> main() File "lesson5.py", line 195, in main glutInit(sys.argv) File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", line 323, in glutInit _base_glutInit( ctypes.byref(count), holder ) TypeError: 'NoneType' object is not callable >>> I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, OpenGL installed on the system. I can get NeHe samples working from within VC++ 2010, just not Python. Thanks!, John |
From: Alejandro S. <as...@gm...> - 2010-01-30 02:23:01
|
Hi John, On Jan 29, 2010, at 8:22 PM, John Lutz <joh...@gm...> wrote: > Hey Guys!, > > Does anyone know what the fix for the following error is: > > C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import lesson5.py > Hit ESC key to quit. > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "lesson5.py", line 240, in <module> > main() > File "lesson5.py", line 195, in main > glutInit(sys.argv) > File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", line > 323, in glutInit > _base_glutInit( ctypes.byref(count), holder ) > TypeError: 'NoneType' object is not callable > >>> > > I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, OpenGL > installed on the system. > I can get NeHe samples working from within VC++ 2010, just not Python. This might sound trivial, but are you importing package "ctypes" from within lesson5.py? It seems as if it didn't know what ctypes.byref is. Best regards, Alejandro.- > > Thanks!, > John > > --- > --- > --- > --------------------------------------------------------------------- > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term > contracts > Personal 24x7 support from experience hosting pros just a phone call > away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Alejandro S. <as...@gm...> - 2010-01-30 02:28:17
|
Hi John, Sorry for the last email. On a second thought I think the problem could be due to the fact that when your launching lesson5 the way you are, sys.argv is None. This might be causing glut to choke. Would you mind testing it by invoking the interpreter using the command line like: C:\python26\bin \python lesson5.py (windows)? Let us know how it goes. Cheers, Alejandro.- Sent from my iPhone On Jan 29, 2010, at 8:22 PM, John Lutz <joh...@gm...> wrote: > Hey Guys!, > > Does anyone know what the fix for the following error is: > > C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import lesson5.py > Hit ESC key to quit. > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "lesson5.py", line 240, in <module> > main() > File "lesson5.py", line 195, in main > glutInit(sys.argv) > File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", line > 323, in glutInit > _base_glutInit( ctypes.byref(count), holder ) > TypeError: 'NoneType' object is not callable > >>> > > I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, OpenGL > installed on the system. > I can get NeHe samples working from within VC++ 2010, just not Python. > > Thanks!, > John > > --- > --- > --- > --------------------------------------------------------------------- > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term > contracts > Personal 24x7 support from experience hosting pros just a phone call > away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |
From: Alejandro S. <as...@gm...> - 2010-01-30 04:33:59
|
Hi John, On Saturday, January 30, 2010, John Lutz <joh...@gm...> wrote: > Hey Alejando, Thanks for the reply! I tried both 'python lesson5.py' that didn't work (btw I'm using 2.5).I cannot find ctypearrays by googling.John could you check whether your python's ctypes package defines function "byref"? You can do this by importing ctypes and typing ctypes.byref from the interactive interpreter. Check to see if that is not None. Also, what version of PyOpenGL are you using? Alejandro.- > > > On Fri, Jan 29, 2010 at 9:27 PM, Alejandro Segovia <as...@gm...> wrote: > > Hi John, > > Sorry for the last email. On a second thought I think the problem could be due to the fact that when your launching lesson5 the way you are, sys.argv is None. > > This might be causing glut to choke. Would you mind testing it by invoking the interpreter using the command line like: C:\python26\bin\python lesson5.py (windows)? > > Let us know how it goes. > > Cheers, > Alejandro.- > > Sent from my iPhone > > On Jan 29, 2010, at 8:22 PM, John Lutz <joh...@gm...> wrote: > > > Hey Guys!, > > Does anyone know what the fix for the following error is: > > C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> import lesson5.py > Hit ESC key to quit. > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "lesson5.py", line 240, in <module> > main() > File "lesson5.py", line 195, in main > glutInit(sys.argv) > File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", line 323, in glutInit > _base_glutInit( ctypes.byref(count), holder ) > TypeError: 'NoneType' object is not callable >>>> > > I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, OpenGL installed on the system. > I can get NeHe samples working from within VC++ 2010, just not Python. > > Thanks!, > John > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > -- > John Lutz > (631)-909-2582 > > > |
From: Alejandro S. <as...@gm...> - 2010-01-30 23:11:15
|
On Jan 30, 2010, at 3:59 AM, John Lutz <joh...@gm...> wrote: > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import ctypes > >>> ctypes.byref > <built-in function byref> > >>> > > 3.0.1b2 Hmmm, ok. I'll have to think about this for a little more :-) I'll try creating a glut app and invoking the lesson 5 code as soon as I get an Internet connecton on my laptop. Cheers, Alejandro.- > > On Fri, Jan 29, 2010 at 11:33 PM, Alejandro Segovia > <as...@gm...> wrote: > Hi John, > > On Saturday, January 30, 2010, John Lutz <joh...@gm...> wrote: > > Hey Alejando, Thanks for the reply! I tried both 'python > lesson5.py' that didn't work (btw I'm using 2.5).I cannot find > ctypearrays by googling.John > > could you check whether your python's ctypes package defines function > "byref"? You can do this by importing ctypes and typing ctypes.byref > from the interactive interpreter. Check to see if that is not None. > > Also, what version of PyOpenGL are you using? > > Alejandro.- > > > > > > > On Fri, Jan 29, 2010 at 9:27 PM, Alejandro Segovia <as...@gm... > > wrote: > > > > Hi John, > > > > Sorry for the last email. On a second thought I think the problem > could be due to the fact that when your launching lesson5 the way > you are, sys.argv is None. > > > > This might be causing glut to choke. Would you mind testing it by > invoking the interpreter using the command line like: C:\python26\bin > \python lesson5.py (windows)? > > > > Let us know how it goes. > > > > Cheers, > > Alejandro.- > > > > Sent from my iPhone > > > > On Jan 29, 2010, at 8:22 PM, John Lutz <joh...@gm...> wrote: > > > > > > Hey Guys!, > > > > Does anyone know what the fix for the following error is: > > > > C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python > > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 > bit (Intel)] on win32 > > Type "help", "copyright", "credits" or "license" for more > information. > >>>> import lesson5.py > > Hit ESC key to quit. > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "lesson5.py", line 240, in <module> > > main() > > File "lesson5.py", line 195, in main > > glutInit(sys.argv) > > File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", > line 323, in glutInit > > _base_glutInit( ctypes.byref(count), holder ) > > TypeError: 'NoneType' object is not callable > >>>> > > > > I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, > OpenGL installed on the system. > > I can get NeHe samples working from within VC++ 2010, just not > Python. > > > > Thanks!, > > John > > > > > > > --- > --- > --- > --------------------------------------------------------------------- > > The Planet: dedicated and managed hosting, cloud storage, colocation > > Stay online with enterprise data centers and the best network in > the business > > Choose flexible plans and management services without long-term > contracts > > Personal 24x7 support from experience hosting pros just a phone > call away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > PyOpenGL Homepage > > http://pyopengl.sourceforge.net > > _______________________________________________ > > PyOpenGL-Users mailing list > > PyO...@li... > > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > > > > > > -- > > John Lutz > > (631)-909-2582 > > > > > > > > > > -- > John Lutz > (631)-909-2582 > |
From: Alejandro S. <as...@gm...> - 2010-02-01 14:34:03
|
Hi John, I'm cleaning up the message thread a little bit for easier readability. > > Does anyone know what the fix for the following error is: >>>> > >>>> > C:\dev\PyOpenGL-Demo-3.0.1b1\PyOpenGL-Demo\NeHe>python >>>> > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit >>>> (Intel)] on win32 >>>> > Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> import lesson5.py >>>> > Hit ESC key to quit. >>>> > Traceback (most recent call last): >>>> > File "<stdin>", line 1, in <module> >>>> > File "lesson5.py", line 240, in <module> >>>> > main() >>>> > File "lesson5.py", line 195, in main >>>> > glutInit(sys.argv) >>>> > File "C:\Python25\Lib\site-packages\OpenGL\GLUT\special.py", line >>>> 323, in glutInit >>>> > _base_glutInit( ctypes.byref(count), holder ) >>>> > TypeError: 'NoneType' object is not callable >>>> >>>> >>>> > >>>> > I am running 2.5 on XP with NVidia drivers. I have GLUT, GLU, OpenGL >>>> installed on the system. >>>> > I can get NeHe samples working from within VC++ 2010, just not Python. >>>> > >>>> >>> OK, I've performed several tests and glut seems to be working fine on all my configurations, in particular: * PyOpenGL 3.0.0 on python2.6 * PyOpenGL 3.0.1b2 on python 2.6 * PyOpenGL 3.0.1b2 on python 2.5 They all seem to work, with the caveat being that all my tests were performed on a Mac. Maybe someone else on the list who's using Windows XP can reproduce the issue? Cheers, Alejandro.- |