Skip to main content
Skip table of contents


“Module not found” / code unable to find pypixxlib

As a first step, please follow the instructions here: Introduction to VPixx Python documentation and install your pypixxlib file in the appropriate Python folder. This is usually something like:


If you have done so already and the error persists, check for multiple instances of Python on your computer. Applications like PsychoPy and Anaconda have their own dedicated Libsite-packages folders and you may need to install or copy pypixxlib into these folders to ensure your program sees it.

Depending on your software, you may also need to explicitly add site-packages to your path. Some Python IDEs have a PYTHONPATH manager that allows you to do this, usually in the “Tools” section of the menu

If you are using the PsychoPy builder, you can add locations to your path by navigating to File-> Preferences -> General and clicking on the little square with the ‘…’ from the row labelled “paths”. 

Pixel Mode triggers not working properly (in PsychoPy)

Pixel mode is a method of sending automated TTL triggers, with timing locked to the onset of your visual stimuli. This is an easy and efficient method for sending triggers to external systems to synchronize them with display behaviour.

Pixel Mode can be used with any of our displays, or the DATAPixx series I/O hubs paired with a third party screen. For an in-depth discussion of the timing and principles of Pixel Mode, please see our VOCAL guide on the subject: Sending Triggers with Pixel Mode.

While your system is in Pixel Mode, TTL signals are sent automatically based on the colour of the top left pixel on your display, as it is detected by the video signal. If, for some reason, the pixel you define is altered by either your experiment software or your GPU, this can lead your trigger to be altered.

If you are using PsychoPy to draw your top left pixel on your target video frame, there are a few known PsychoPy elements that can impact your pixel output. Below is a list of things you can try to achieve a 1-1 mapping between pixel assignment and output.

By the way, if you want to check your digital TTL output without turning on your receiver, you can see the current states of the digital output ports in our PyPixx utility, under Demo > Digital I/O Demo.

  1. Make sure Pixel Mode is enabled. On some of our systems it is not on by default. The easiest way to turn this setting on is to navigate to our PyPixx software utility and go to Configuration > Output Mode. If this is a shared testing station, make sure to disable it after using.

  2. If you are using the Builder, consider drawing your pixel in the Coder rather than using a drag and drop item. This will give you full control over the parameters which may be hidden in the Builder view. Some example code is given below.

  3. Use the rgb255 colour space. This avoids rounding issues in colour assignment.

  4. Draw your pixel as a line, not a shape. PsychoPy shape classes have both a line and a fill colour parameter, which do not seem to be fully compatible with the rgb255 colour space. Lines seem to be much more reliable.

  5. Turn off interpolation. In PsychoPy pixel interpolation is on by default, and this can alter pixel values. Set this parameter to false for your specific line serving as your Pixel Mode pixel.

  6. Account for any gamma correction applied by the monitor center. If you are applying blanket gamma corrections to your pixel values, this will surely alter your pixel as it is drawn in your code. This is not a problem as long as you account for this and draw a pixel that, when gamma corrected, produces the desired output.

  7. Turn off the GUI feature. This feature adds a narrow interactive border to the window that can overwrite your pixel.

  8. Check for dithering. The issue may not be specific to PsychoPy, especially if it is intermittent. See our guide:Diagnosing and Disabling Dithering in the Graphics Pipeline for more details.

Below is a snippet of code demonstrating how to draw a pixel with PsychoPy visual elements:

from psychopy import visual
def drawPixelModeTrigger(win, pixelValue):
    #takes an RGB255 pixel value and draws it as a single pixel in the top left corner of the window 'win'
    #window must cover top left of screen to work
    #interpolate must be set to FALSE before color is set
    #call this just before flip to ensure pixel is drawn over other stimuli
    topLeftCorner = [-win.size[0]/2, win.size[1]/2]
    line = visual.Line(
            units = 'pix',
            end=[topLeftCorner[0]+1, topLeftCorner[1]],
            interpolate = False,
            colorSpace = 'rgb255',
            lineColor = pixelValue)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.