Frequently asked questions

If you don’t see an answer to your question below, you can email it to me ( or post it in the relevant Moodle discussion forum (if you are enrolled in a course at UNSW).

  • I get an error that includes SyntaxError: Missing parentheses in call to 'print'

    This arises because of an incompatibility between major versions of Python (2 and 3). As discussed in Getting Started, this guide requires Python version 2. To fix this error, check that you have followed the process described in Getting Started when setting up your system.

  • How do I know what properties are available for the various stimulus types in psychopy?

    The best place is to refer to the psychopy reference manual. Click through to the stimulus type you’re after (such as psychopy.visual and then ImageStim) and you will find a list of its properties and some helpful explanations.

  • What about veusz, how do I know what properties are available for the various figure elements?

    A simple way is to print all the properties are available, which are accessible via the childnames property. For example:

    xy = graph.Add("xy")
    print xy.childnames
    ['Color', 'PlotLine', 'MarkerLine', 'MarkerFill', 'ErrorBarLine', 'FillBelow', 'FillAbove', 'Label', 'marker', 'markerSize', 'color', 'thinfactor', 'errorthin', 'xData', 'yData', 'hide', 'key', 'xAxis', 'labels', 'scalePoints', 'yAxis', 'errorStyle']
  • What happened to the exercises?

    Many of the lessons used to have questions (and their answers). Unfortunately, they weren’t very good questions so I have removed them for the moment while I make up some new ones. But, if you still want to see the questions, you can find them in the PDFs of the old sites for fundmentals, vision, and data.

  • What happened to the screencasts?

    Many of the lessons also used to have screencasts, which would show my Spyder desktop while I worked through the material. I found that these screencasts weren’t very conducive to learning, and difficult to keep up-to-date, so I have not included them with this material. They can still be accessed via YouTube playlists for fundamentals, vision science, and data analysis.

  • How can I read data from an SPSS sav file?

    You can use the savReaderWriter package. If you need to install it, you can do so by running pip install savReaderWriter.

    As an example, say you had an SPSS file called spss_demo.sav that contained:

    age colour threshold
    22.0 r 0.1
    28.0 g 0.9
    25.0 b 0.5

    You could access the data using something like:

    import savReaderWriter
    reader = savReaderWriter.SavReader("spss_demo.sav")
    all_data = reader.all()
    print all_data
    variable_names = reader.varNames
    print variable_names
[[22.0, 'r', 0.1], [28.0, 'g', 0.9], [25.0, 'b', 0.5]]
['age', 'colour', 'threshold']
See the documentation for more details.
  • What does the error in spyder about sitecustomize mean?
    This can be safely ignored, and won’t affect any of your scripts.