[visionegg] Re: Dynamic function loading not implemented/supported on this platform

Dear Martin,

This particular error comes from deep within the black magic of PyOpenGL trying to dynamically find the right function for you. I have no idea why it's failing. The current CVS code has a comment on the equivalent line "Need PyOpenGL >= 2.0", which I assume you have.

As a first debugging step, I'd set the logging to a more verbose level to see if that reveals anything interesting:

import VisionEgg
VisionEgg.start_default_logging()
VisionEgg.logger.setLevel( VisionEgg.logging.DEBUG )

As a second step, consider the following. VisionEgg.Core has some trickery dealing with various versions of OpenGL in the post_gl_init() and init_gl_extension() functions, which may (or may not) be related. Basically, after OpenGL 1.3, "glActiveTextureARB(GL_TEXTURE1_ARB) " should just be "glActiveTexture(GL_TEXTURE1)" but the Vision Egg adds the *ARB names to its own OpenGL namespace to avoid having two code paths depending on OpenGL version. So, make sure your own code isn't somehow alter this namespace in a way that the VisionEgg can't recover from:

At the beginning of your script, do:

import OpenGL.GL.ARB.multitexture
import VisionEgg.GL
import OpenGL.GL.ARB.multitexture
OpenGL.GL.ARB.multitexture.glInitMultitextureARB()

Now do your normal stuff here, including opening a screen...

And sprinkle the following line throughout your code:
print OpenGL.GL.ARB.multitexture.glActiveTextureARB is VisionEgg.GL.glActiveTextureARB


It should print "True" anytime after a VisionEgg Screen instance has been created.

Finally, some workaround attempts: What happens if you do "import VisionEgg.Textures" before importing your first script? What happens if you make an instance of a unused stimulus with a mask before you import your first script? What happens if you do the same, but DO "display" it, albeit in a location offscreen and just for a single frame so that it's invisible?

I hope some of this helps. PyOpenGL doesn't really deal with multiple versions of OpenGL very well, and this is probably a result. Good luck, and let us know if anything helps.

Cheers!
Andrew


Martin Spacek wrote:

Hello,

I'd like to execute multiple scripts in succession. To do this, I'm using a .py file with multiple import statements, one for each script I want to run. For now, I'm just trying this with a moving target script (barscript.py) and a gratings script (gratingscript.py). If I import gratingscript.py first, followed by barscript.py, everything works fine. First the gratings run, and when they're finished, the moving target script runs. But when I try the reverse order (barscript.py, then gratingscript.py), barscript.py runs fine, but when gratinscript.py starts up, I get the following error:

File "C:\Python23\Lib\site-packages\VisionEgg\Textures.py", line 1194, in __init__
gl.glActiveTextureARB(gl.GL_TEXTURE1_ARB)
OpenGL.GL.GLerror: [Errno (1282,)] Dynamic function loading not implemented/supported on this platform


This error happens when creating an instance of the Mask2D class in the gratings script. When I comment out the mask instance, the error goes away and everything runs fine (but without a mask on the grating). It sounds like something's unhappy that stuff's been previously written to screen, but I don't know. I haven't tried this on another machine yet, I'll see if that changes anything.

I'm running the 1.0-cvs binary in Windows with Python 2.3.4 and all the recommended versions of the dependencies. Here's the full log of the error:

2005-01-11 02:37:23,660 (1204) INFO: Requesting window 1024 x 768 32 bpp (8 8 8 8 RGBA).
2005-01-11 02:37:23,769 (1204) INFO: OpenGL 1.4.1, GeForce2 MX/AGP/3DNOW!, NVIDIA Corporation
2005-01-11 02:37:23,769 (1204) INFO: Video system reports 32 bpp (8 8 8 8 RGBA).
2005-01-11 02:37:23,799 (1204) INFO: Gamma set sucessfully: linearized gamma lookup tables to correct monitor with native gammas (2.100000, 2.100000, 2.100000) RGB
2005-01-11 02:37:23,819 (1204) CRITICAL: Traceback (most recent call last):
File "C:\Desktop\Display\multiscript.py", line 7, in ?
exec('import '+script)
File "<string>", line 1, in ?
File "C:\Desktop\Display\gratingscript.py", line 72, in ?
gratings(preexpSec, postexpSec, orioff, mindurationSec, mask, diameterDeg, widthDeg, heightDeg, ori, tfreqCycSec, sfreqCycDeg, phase0, pedestal, contrast, bgbrightness, durationSec, postsweepSec, varlist, nruns, shuffleSweeps, blankSweep, shuffleBlankSweeps)
File "C:\Desktop\Display\Display\Gratings.py", line 143, in gratings
num_samples=(nmasksamples,nmasksamples)) # size of mask texture data (# of texels), quality/performance tradeoff?
File "C:\Python23\Lib\site-packages\VisionEgg\Textures.py", line 1194, in __init__
gl.glActiveTextureARB(gl.GL_TEXTURE1_ARB)
GLerror: [Errno (1282,)] Dynamic function loading not implemented/supported on this platform


Any advice?

Thanks,

Martin Spacek
PhD student, Graduate Program in Neuroscience
Dept. of Ophthalmology and Visual Sciences
University of British Columbia, Vancouver, BC, Canada
+1-604-875-4555 ext. 66282
mspacek@xxxxxxxxxxxxxxx | http://swindale.ecc.ubc.ca
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html



-- Andrew D. Straw Post-doctoral scholar ,-. Dickinson Lab \_/ California Institute of Technology 8||} Mailcode 138-78 / \ Pasadena CA 91125, USA `-^ email: astraw@xxxxxxxxxxx office: +1 626 395 5828


====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

Other related posts: