Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

psychopy errors in neurdebian vm #216

Closed
satra opened this Issue · 7 comments

4 participants

@satra

installation errors

Setting up psychopy (1.74.03.dfsg-1~nd60+1) ...
Processing triggers for menu ...
Processing triggers for python-support ...
/usr/lib/pymodules/python2.5/psychopy/app/builder/builder.py:3338: Warning: 'with' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/psychopy/app/builder/builder.py ...
  File "/usr/lib/pymodules/python2.5/psychopy/app/builder/builder.py", line 3338
    with WindowFrozen(self):#try to pause rendering until all panels updated
                    ^
SyntaxError: invalid syntax

/usr/lib/pymodules/python2.5/psychopy/compatibility.py:66: Warning: 'with' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/psychopy/compatibility.py ...
  File "/usr/lib/pymodules/python2.5/psychopy/compatibility.py", line 66
    with codecs.open(filename, 'rb') as f:
              ^
SyntaxError: invalid syntax

/usr/lib/pymodules/python2.5/psychopy/hardware/__init__.py:148: Warning: 'as' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/psychopy/hardware/__init__.py ...
  File "/usr/lib/pymodules/python2.5/psychopy/hardware/__init__.py", line 148
    except Exception as ex:
                      ^
SyntaxError: invalid syntax

/usr/lib/pymodules/python2.5/psychopy/microphone.py:314: Warning: 'as' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/psychopy/microphone.py ...
  File "/usr/lib/pymodules/python2.5/psychopy/microphone.py", line 314
    except StandardError as ex: # or maybe a dropped connection, etc
                          ^
SyntaxError: invalid syntax

/usr/lib/pymodules/python2.5/psychopy/web.py:391: Warning: 'as' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/psychopy/web.py ...
  File "/usr/lib/pymodules/python2.5/psychopy/web.py", line 391
    except urllib2.URLError as ex:
                             ^
SyntaxError: invalid syntax

but it apparently installs and the builder starts fine and then when you try to run a dummy experiment. just hit the play button in the builder:

##### Running: /usr/lib/pymodules/python2.6/psychopy/demos/coder/stimuli/aperture.py #####
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/psychopy/demos/coder/stimuli/aperture.py", line 3, in <module>
    win = visual.Window([400,400],allowStencil=True,units='norm')
  File "/usr/lib/pymodules/python2.6/psychopy/visual.py", line 292, in __init__
    elif self.winType == "pyglet": self._setupPyglet()
  File "/usr/lib/pymodules/python2.6/psychopy/visual.py", line 868, in _setupPyglet
    config = GL.Config(depth_size=8, double_buffer=True, stencil_size=8)
  File "/usr/lib/pymodules/python2.6/pyglet/__init__.py", line 306, in __getattr__
    __import__(import_name)
  File "/usr/lib/pymodules/python2.6/pyglet/gl/__init__.py", line 510, in <module>
    import pyglet.window
  File "/usr/lib/pymodules/python2.6/pyglet/window/__init__.py", line 1684, in <module>
    gl._create_shadow_window()
  File "/usr/lib/pymodules/python2.6/pyglet/gl/__init__.py", line 494, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/usr/lib/pymodules/python2.6/pyglet/window/xlib/__init__.py", line 474, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/pyglet/window/__init__.py", line 686, in __init__
    self._create()
  File "/usr/lib/pymodules/python2.6/pyglet/window/xlib/__init__.py", line 683, in _create
    self.switch_to()
  File "/usr/lib/pymodules/python2.6/pyglet/window/xlib/__init__.py", line 773, in switch_to
    self._config._fbconfig, self._window, None)
AttributeError: 'XlibGLConfig10' object has no attribute '_fbconfig'
@peircej
Owner
@satra

thanks @peircej

the vm is running python 2.6.6 - i believe the installation problems might be a neurodebian error (@yarikoptic).

brain@neurodebian:~$ python 
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) 

regarding opengl, we are using the mesa-utils package to create the package. the glxinfo is here:

https://gist.github.com/3879876

i completely understand the limitations of a vm. we are trying to create a setup to demo a few things. in practice things are run outside of a vm.

@yarikoptic
Owner

upon a little of debugging

AttributeError: 'XlibGLConfig10' object has no attribute '_fbconfig'

happens because for some reason first call to

glXQueryVersion(self.display, byref(major), byref(minor))

results in major=1, minor =2; but upon subsequent calls in minor being 3! so, pyglet first creates config structure XlibGLConfig10 while later on assuming to deal with XlibGLConfig13 .

But I wonder why is that so??? is that a bug in glx or ctypes or documentation...?
quick workaround in pyglet is just to duplicate the call above -- then I run gabor.py demo just fine

@peircej
Owner
@yarikoptic
Owner
@peircej
Owner
@jnvandermeer

Hi all, I reproduced these results also on my (standard neurodebian) VM.

I just added a new line of "glXQueryVersion(self.display, byref(major), byref(minor))" in /usr/share/pyshared/pyglet/gl/glx_info.py before it's called and that works.

It now throws this warning:
OpenGL Warning: glXChooseFBConfig returning NULL, due to attrib=0xc, next=0x18

@peircej peircej closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.