Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Error: Source and destination surfaces need the same format. ????

edited March 2014 in OpenSesame

Hello everyone,

We tried to run our experiment on another computer than we were used to. We get this error: Source and destination surfaces need the same format.

We already tried to adjust the pixellevels, but this didn't work. When we run the experiment, it shows the instructions but when the actual task should begin, it stops and shows the error.

The computer is from the brand "Eizo" with a screen from " FlexScan S1932"

Please help!!!


  • edited 8:22PM


    Could you post the full error message, which you can find in the debug window? Please also include the relevant script, if the error results from an inline_script, and information about the operating system and back-end that you're using.


  • edited March 2014

    This is the message displayed in the debug window:

    Python 2.6.1
    Type "help()", "copyright()", "credits()" or "license()" for more information.
    Type "modules()" for details about installed modules and version information.
    Use the "print [msg]" statement in inline_script items to print to this debug window.
    openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 512
    openexp._canvas.legacy.init_display(): enabling hardware surface
    openexp._canvas.legacy.init_display(): enabling double buffering
    openexp._canvas.legacy.init_display(): video mode ok
    experiment.init_log(): using 'F:/defaultlog.csv' as logfile (ascii) experiment started at Mon Mar 31 14:19:15 2014
    Traceback (most recent call last):
      File "G:\Programmatuur\opensesameportable-0.26-pre6-1-win32\opensesame-0.26\libqtopensesame\", line 1647, in run_experiment
      File "F:\opensesameportable-0.26-4\opensesame-0.26\libopensesame\", line 258, in run
      File "F:\opensesameportable-0.26-4\opensesame-0.26\libopensesame\", line 59, in run
      File "F:\opensesameportable-0.26-4\opensesame-0.26\libopensesame\", line 152, in run
        if _item.prepare():
      File "F:\opensesameportable-0.26-4\opensesame-0.26\libopensesame\", line 119, in prepare
        if not self.experiment.items[_item].prepare():
      File "F:\opensesameportable-0.26-4\opensesame-0.26\libopensesame\", line 184, in prepare
        self.canvas.image(self.experiment.get_file(_item["file"]), _item["center"] == 1, _item["x"], _item["y"], _item["scale"])
      File "F:\opensesameportable-0.26-4\opensesame-0.26\openexp\_canvas\", line 572, in image
    ValueError: Source and destination surfaces need the same format.

    We are using an inline script but I don't know if thats the problem, however, this is the inline script were using:

    # we will need to import the library that
    # we will use to play the sound
    import pygame
    # first, we check if it is initialized; if it is
    # not, we initialize it
    if not pygame.mixer.get_init():
    # next, we will need to specify the sound
    # file (NOTE: this has to be added to your
    # file pool!
    sound_name = "5-0.wav" # change to your own filename
    sound_path = exp.get_file(sound_name)
    # now we initialize the sound; this means
    # we prepare it so that it can be played
    exp.sound = pygame.mixer.Sound(sound_path)
    # finally, play the sound! (the -1 indicates
    # that it should play infinitely)
  • edited 8:22PM

    Ok, that's a weird error indeed. As a first step, I would see if you still get this error with the most recent version of OpenSesame. Right now you're using 0.26, which is relatively ancient (almost two years old):

    I think there's a good chance that updating will resolve the issue, even though, to be honest, I have no clue what causes it. If an update doesn't resolve things, we'll take it from there.


  • edited 8:22PM

    As a potential temporary workaround: could you check if the 'psycho' back-end provides the same error?

  • edited December 2018


    I am having the same error with the latest version of OpenSesame. I am able to run the experiment full screen using expyriment and psychopy backend but not the legacy backend.

    Here is my experiment


  • Hi Han,

    Maybe a new issue for that. The discussion is almost 5 years old, so it is highly unlikely that the issue is caused by the same thing.



Sign In or Register to comment.