[visionegg] problem with Text() in visionegg 1.0

  • From: Russ Poldrack <poldrack@xxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 16 Jan 2006 09:42:55 -0800

hi - I'm having a problem displaying Text() objects in visionegg 1.0 (running Mac OS X 10.4.4, Python 2.3.5). I have attached a program that recreates the problem. whenever I call Text() to create a text object, I get the following error after the stimulus is drawn to the screen:

Fatal Python error: Call to API function without first calling import_libnumeric() in src/interface/GL._GL__init__.0101.inc
Abort


you can recreate the problem by setting use_text = 1 in the attached program; when use_text is set to zero it uses dots instead, which works fine. Any suggestions would be greatly appreciated.
cheers
russ


import VisionEgg
from VisionEgg.Core import *
from VisionEgg.Text import Text
from VisionEgg.Dots import *

VisionEgg.start_default_logging();

import pygame
from pygame.locals import QUIT, KEYDOWN, MOUSEBUTTONDOWN

pygame.init()
screen = get_default_screen()
screen.parameters.bgcolor = (0.0,0.0,0.0,0.0) # make black (RGBA)
screen.clear()

use_text=1

if use_text:
   stimulus = Text( text     = "Vision Egg multi stimulus demo - Loading...",
                     position = (screen.size[0]/2,screen.size[1]/2),
                     anchor   = 'center',
                     color    = (1.0, 1.0, 1.0),
                     )

else:
   stimulus = DotArea2D( position                = ( screen.size[0]/2.0, 
screen.size[1]/2.0 ),
                      anchor                  = 'center',
                      size                    = ( 300.0 , 300.0 ),
                      signal_fraction         = 0.1,
                      signal_direction_deg    = 180.0,
                      velocity_pixels_per_sec = 10.0,
                      dot_lifespan_sec        = 5.0,
                      dot_size                = 3.0,
                      num_dots                = 100)

viewport_2d = Viewport( screen  = screen,
                        stimuli = [stimulus])

viewport_2d.draw()
swap_buffers()
quit_now=0

while quit_now==0:
      for event in pygame.event.get():
          if event.type in (QUIT,KEYDOWN,MOUSEBUTTONDOWN):
             quit_now = 1

--- Russell A. Poldrack, Ph.d. Assistant Professor UCLA Department of Psychology Franz Hall, Box 951563 Los Angeles, CA 90095-1563

phone: 310-794-1224
fax: 310-206-5895
email: poldrack@xxxxxxxx
web: www.poldracklab.org



Other related posts: