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. Data filenames
  3. Experiment Settings
  4. Filtering components
  5. Pilot mode
  6. PsychoPy Primer
  7. Should I install the modern (py3.10) or compatibility+ (py 3.8) version?
  8. Spreadsheets
  9. 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. Opening older PsychoPy files
  12. Presenting to multiple screens
  13. PsychoPy files are saved in plain text
  14. Random functions
  15. Reuse your routines
  16. Reuse your visual objects
  17. Saving screenshots
  18. Setting the contents of an editable textbox
  19. Showing different trials to a returning participant
  20. Show your file extensions
  21. Try out PsychoPy 2025.1.0
  22. Use a stable version
  23. Use keyboard components instead of event.getKeys()
  24. Use Routine Settings
  25. 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. Counterbalancing online
  6. Custom function: defined
  7. Custom function: remove
  8. Daisy chaining
  9. Define functions to reduce manual editing of JavaScript code
  10. Developer Tools
  11. Disable right-click context menu
  12. Don’t delete your repository
  13. Downloading resources on the fly
  14. Download your data before switching your experiment to inactive
  15. Exit cleanly
  16. How to use the Pavlovia Shelf
  17. “[Init]…” isn’t an error message
  18. Know the difference between PsychoJS and jsPsych
  19. Mirror images
  20. Output path should be blank
  21. Pavlovia usernames should contain letters
  22. Preloading stimuli in code
  23. Reverting to an earlier version
  24. Run the latest version of your experiment
  25. Saving incomplete results
  26. Set initial values if you update Each Frame
  27. Setting colours in code
  28. Sound components should start after the routine has started
  29. Skipping dialogue boxes online
  30. Splitting textbox.text online
  31. Submitting slider responses
  32. The answer is (almost) never to edit the generated code
  33. Use Auto → JS code components wherever possible
  34. Use foreslashes not backslashes in file paths
  35. Use height units
  36. Use HTTPS to connect to GitLab not SSH
  37. Use relative paths
  38. Use setAutoDraw() not draw()
  39. 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. Understanding trials.thisIndex
  13. 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. Counterbalancing embedded surveys
  2. Dynamic Survey Completion URLs
  3. Editing JSON code directly
  4. Embedded surveys failing to download in 2025.1.0
  5. Embedding media in a Pavlovia Survey
  6. Save your survey
  7. Sharing surveys
  8. Single-select matrix requirements
  9. Survey pages with descriptions must have questions
  10. Survey versions
  11. Use Embedded Surveys in online experiments

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