Wakefield's Daily Tips - Index

Here is an index of the posts in my daily tips thread, grouped into topics. I will edit this post as I add the tips.

Fundamentals

  1. Builder isn’t Coder
  2. Experiment Settings
  3. Filtering components
  4. Pilot mode
  5. PsychoPy Primer
  6. Should I install the modern (py3.10) or compatibility+ (py 3.8) version?
  7. Spreadsheets
  8. Test the installation

Builder

  1. Check (or uncheck) isTrials
  2. Code components go at the top
  3. Code components still run if routine is skipped
  4. Create your own Routine Templates
  5. Delaying the end of a routine
  6. Don’t use polygon borders above 20
  7. Find in experiment
  8. How to use the colour picker
  9. Interruption tasks
  10. Know your quotes
  11. Presenting to multiple screens
  12. PsychoPy files are saved in plain text
  13. Random functions
  14. Reuse your routines
  15. Reuse your visual objects
  16. Saving screenshots
  17. Showing different trials to a returning participant
  18. Show your file extensions
  19. Try out PsychoPy 2025.1.0
  20. Use a stable version
  21. Use keyboard components instead of event.getKeys()
  22. Use Routine Settings
  23. Use the textbox component

Online

  1. Allowing others to pilot your experiment
  2. Check your experiment name
  3. Compare elements not lists
  4. Copying an existing project
  5. Custom function: defined
  6. Custom function: remove
  7. Daisy chaining
  8. Define functions to reduce manual editing of JavaScript code
  9. Developer Tools
  10. Don’t delete your repository
  11. Downloading resources on the fly
  12. Exit cleanly
  13. How to use the Pavlovia Shelf
  14. “initialising…” isn’t an error message
  15. Know the difference between PsychoJS and jsPsych
  16. Mirror images
  17. Output path should be blank
  18. Pavlovia usernames should contain letters
  19. Preloading stimuli in code
  20. Reverting to an earlier version
  21. Run the latest version of your experiment
  22. Saving incomplete results
  23. Set initial values if you update Each Frame
  24. Setting colours in code
  25. Sound components should start after the routine has started
  26. Skipping dialogue boxes online
  27. Splitting textbox.text online
  28. Submitting slider responses
  29. The answer is (almost) never to edit the generated code
  30. Use Auto → JS code components wherever possible
  31. Use Embedded Surveys in online experiments
  32. Use foreslashes not backslashes in file paths
  33. Use height units
  34. Use HTTPS to connect to GitLab not SSH
  35. Use relative paths
  36. Using .pop() online

Variables and spreadsheets

  1. Avoid multiple spreadsheets
  2. Check for blank rows in your spreadsheets
  3. Coding is case sensitive
  4. Data variable order
  5. Define your variables
  6. Don’t modify spreadsheet variables
  7. Extending lists
  8. Loops without a conditions spreadsheet
  9. Naming conventions
  10. Sentence case
  11. Spreadsheets can be semicolon or tab delimited
  12. Use Print statements

PsychoPy error messages

  1. AssertionError: Could not retrieve user info for user xxx, server returned: {}

Pavlovia error messages

  1. IndexSizeError: Failed to execute ‘getImageData’ on ‘OffscreenCanvasRenderingContext2D’: The source width is 0.
  2. RangeError: Maximum call stack size exceeded
  3. ReferenceError: currentLoop is not defined
  4. ReferenceError: varName is not defined
  5. resources should be either (a) a string or (b) an array of string or objects
  6. TypeError: Cannot read properties of undefined (reading ‘x’)
  7. TypeError: Cannot read property ‘x’ of undefined
  8. TypeError: x is not a constructor
  9. unable to convert undefined to a number
  10. Uncaught SyntaxError: Illegal return statement

Pavlovia Surveys

  1. Dynamic Survey Completion URLs
  2. Editing JSON code directly
  3. Embedded surveys failing to download in 2025.1.0
  4. Embedding media in a Pavlovia Survey
  5. Save your survey
  6. Sharing surveys
  7. Single-select matrix requirements
  8. Survey pages with descriptions must have questions
  9. Survey versions

Python Scripts

  1. Extracting expInfo variables
  2. Merging data files

Study Design

  1. Random vs Counterbalanced

Forum

  1. Consultancy as support
  2. Formatting code in forum posts
  3. Post Python code whenever possible
  4. Use the error message as the title of your forum post
  5. Use the topic template

External Tools

  1. Anonymous Participant IDs
  2. Debrief
  3. IrfanView
  4. WordHTML
  5. YayText bold and italic text generator

Other

  1. Cite your sources
  2. Own up to AI
3 Likes