# \#syntaxerror

**URL:** https://discourse.psychopy.org/tag/syntaxerror/38.md

[Latest](https://discourse.psychopy.org/latest.md) · [Categories](https://discourse.psychopy.org/categories.md) · [Tags](https://discourse.psychopy.org/tags.md)

---

## [PsychoPy version error](https://discourse.psychopy.org/t/psychopy-version-error/45248)

<div class="topic-metadata">

**Author:** [@basak\_acar](https://discourse.psychopy.org/u/basak_acar)\
**Replies:** 1\
**Last updated:** [July 29, 2025, 9:54am UTC](https://discourse.psychopy.org/t/psychopy-version-error/45248 "2025-07-29T09:54:39Z")

</div>

I developed an experiment on my own computer using PsychoPy version 2025.1.1, and it runs without any issues. However, it doesn’t work properly on the lab computers at the university because they don’t have the updated v…

---

## [Error During Sync with Pavlovia (Error 404)](https://discourse.psychopy.org/t/error-during-sync-with-pavlovia-error-404/43890)

<div class="topic-metadata">

**Author:** [@zka](https://discourse.psychopy.org/u/zka)\
**Replies:** 2\
**Last updated:** [February 17, 2025, 6:20pm UTC](https://discourse.psychopy.org/t/error-during-sync-with-pavlovia-error-404/43890 "2025-02-17T18:20:28Z")

</div>

\*\*OS: Windows 11 \*\*PsychoPy version: v2024.2.4. \*\*Standard Standalone: Standard \*\*What are you trying to achieve?: Sync the experiment to my pavlovia account Hello! I’m trying to sync to my Pavlovia account and run t…

---

## [I get an error when i try to complete a survey](https://discourse.psychopy.org/t/i-get-an-error-when-i-try-to-complete-a-survey/39253)

<div class="topic-metadata">

**Author:** [@zaimakis123](https://discourse.psychopy.org/u/zaimakis123)\
**Replies:** 3\
**Last updated:** [March 21, 2024, 6:57pm UTC](https://discourse.psychopy.org/t/i-get-an-error-when-i-try-to-complete-a-survey/39253 "2024-03-21T18:57:45Z")

</div>

URL of experiment: \[Learning and Decision Making Study (with $10 Bonus Payment)\] (gatingrl \[PsychoPy\]) Description of the problem: While i try to open your survey : Learning and Decision Making Study (with $10 Bonus …

---

## [Arduino + Psychopy GSR Experiment : Data save code error in excel file](https://discourse.psychopy.org/t/arduino-psychopy-gsr-experiment-data-save-code-error-in-excel-file/37020)

<div class="topic-metadata">

**Author:** [@Subban](https://discourse.psychopy.org/u/Subban)\
**Replies:** 0\
**Last updated:** [October 23, 2023, 7:32pm UTC](https://discourse.psychopy.org/t/arduino-psychopy-gsr-experiment-data-save-code-error-in-excel-file/37020 "2023-10-23T19:32:28Z")

</div>

I have used Arduino (analog) and psychopy for a Galvanic Skin Response experiment. I have adapted Recording information from an Arduino via serial port — PsychoPy v2023.2.3 coding for the above mentioned experiment. No…

---

## [JS Hex error and undefined (reading 'toString')](https://discourse.psychopy.org/t/js-hex-error-and-undefined-reading-tostring/35541)

<div class="topic-metadata">

**Author:** [@otaviomattos](https://discourse.psychopy.org/u/otaviomattos)\
**Replies:** 4\
**Last updated:** [June 29, 2023, 12:16pm UTC](https://discourse.psychopy.org/t/js-hex-error-and-undefined-reading-tostring/35541 "2023-06-29T12:16:39Z")

</div>

URL of experiment: Description of the problem: Dear all, I have just created a trial for a study using essentially builder, no coding (PsychoPy v2023.1.2). The trial is very simple, it is composed of a slider, some t…

---

## [ReferenceError: popRandomElement is not defined](https://discourse.psychopy.org/t/referenceerror-poprandomelement-is-not-defined/34124)

<div class="topic-metadata">

**Author:** [@Noah\_Hager](https://discourse.psychopy.org/u/Noah_Hager)\
**Replies:** 0\
**Last updated:** [March 28, 2023, 6:54pm UTC](https://discourse.psychopy.org/t/referenceerror-poprandomelement-is-not-defined/34124 "2023-03-28T18:54:55Z")

</div>

URL of experiment: Description of the problem: Hey guys, so i’m having a problem where a function “popRandomElement” which i have defined in my psychopy experiment in a Begin Experiment Tab in JS, comes up with an error…

---

## [TypeError: Cannot use 'in' operator to search for 'backspace' in undefined](https://discourse.psychopy.org/t/typeerror-cannot-use-in-operator-to-search-for-backspace-in-undefined/34043)

<div class="topic-metadata">

**Author:** [@Noah\_Hager](https://discourse.psychopy.org/u/Noah_Hager)\
**Replies:** 4\
**Last updated:** [March 27, 2023, 6:55pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-use-in-operator-to-search-for-backspace-in-undefined/34043 "2023-03-27T18:55:07Z")

</div>

URL of experiment: Noah Hager / javatranslatetest · GitLab Description of the problem: Hey guys, i’ve been trying to get a PsychoPy experiment that i mostly programmed in Python (PsychopyBuilder) to get to work on Pavl…

---

## [Sending triggers to NetStation - Error 10051: "A socket operation was attempted to an unreachable network"](https://discourse.psychopy.org/t/sending-triggers-to-netstation-error-10051-a-socket-operation-was-attempted-to-an-unreachable-network/29046)

<div class="topic-metadata">

**Author:** [@ifetS](https://discourse.psychopy.org/u/ifetS)\
**Replies:** 3\
**Last updated:** [January 10, 2023, 11:30am UTC](https://discourse.psychopy.org/t/sending-triggers-to-netstation-error-10051-a-socket-operation-was-attempted-to-an-unreachable-network/29046 "2023-01-10T11:30:41Z")

</div>

Continuing the discussion from Egi library and python3: Hi! I am stuck trying to establish a connection between the Psychopy stimulus presentation computer and the EEG recording computer (Mac) running EGI Netstation Acq…

---

## [Pavlovia-Error message when loading experiment online](https://discourse.psychopy.org/t/pavlovia-error-message-when-loading-experiment-online/32642)

<div class="topic-metadata">

**Author:** [@Loubna123](https://discourse.psychopy.org/u/Loubna123)\
**Replies:** 14\
**Last updated:** [January 6, 2023, 2:55pm UTC](https://discourse.psychopy.org/t/pavlovia-error-message-when-loading-experiment-online/32642 "2023-01-06T14:55:56Z")

</div>

URL of experiment: https://run.pavlovia.org/Loubna/lou/?\_\_pilotToken=c74d97b01eae257e44aa9d5bade97baf&\_\_oauthToken=72a2cf51aec2230b3d66d1223efd1ce88837f38f3c613d58ed4a6acb9f69b144 Description of the problem: Hi, I am t…

---

## [Stuck on initialising experiment when running through Pavlovia](https://discourse.psychopy.org/t/stuck-on-initialising-experiment-when-running-through-pavlovia/32484)

<div class="topic-metadata">

**Author:** [@georgsnarbuts](https://discourse.psychopy.org/u/georgsnarbuts)\
**Replies:** 4\
**Last updated:** [December 20, 2022, 10:09am UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment-when-running-through-pavlovia/32484 "2022-12-20T10:09:50Z")

</div>

URL of experiment: Constellations\_NAI2022\_ENG \[PsychoPy\] Description of the problem: Hello, I’ve run into a problem with putting my experiment online through pavlovia. The experiment always gets stuck on “initialising…

---

## [Psychopy error Traceback (most recent call last):](https://discourse.psychopy.org/t/psychopy-error-traceback-most-recent-call-last/32315)

<div class="topic-metadata">

**Author:** [@xiaoyu\_Du](https://discourse.psychopy.org/u/xiaoyu_Du)\
**Replies:** 0\
**Last updated:** [December 5, 2022, 5:21am UTC](https://discourse.psychopy.org/t/psychopy-error-traceback-most-recent-call-last/32315 "2022-12-05T05:21:35Z")

</div>

when i open my program,it shows the words like this.If anyone knows what wrong is it.Thanks a lot!!! Traceback (most recent call last): File “C:\\Program Files\\PsychoPy\\lib\\site-packages\\urllib3\\connectionpool.py”, line…

---

## [Bug Report: Issue with Syncing Experiments from Pavlovia to PsychoPy](https://discourse.psychopy.org/t/bug-report-issue-with-syncing-experiments-from-pavlovia-to-psychopy/31754)

<div class="topic-metadata">

**Author:** [@parthnn1](https://discourse.psychopy.org/u/parthnn1)\
**Replies:** 1\
**Last updated:** [November 5, 2022, 1:04pm UTC](https://discourse.psychopy.org/t/bug-report-issue-with-syncing-experiments-from-pavlovia-to-psychopy/31754 "2022-11-05T13:04:32Z")

</div>

Hello! I am currently using MacOS Ventura 13.0 and I am using PsychoPy Builder v2022.2.4. I was attempting to use the Pavlovia search function on the PsychoPy to fork and sync an experiment from the Pavlovia explore pag…

---

## [EOF error for input in PsychoPy](https://discourse.psychopy.org/t/eof-error-for-input-in-psychopy/28981)

<div class="topic-metadata">

**Author:** [@Amber\_Leeson](https://discourse.psychopy.org/u/Amber_Leeson)\
**Replies:** 1\
**Last updated:** [May 5, 2022, 11:42am UTC](https://discourse.psychopy.org/t/eof-error-for-input-in-psychopy/28981 "2022-05-05T11:42:07Z")

</div>

Hi everyone, I’m really really stuck and need some help. I’m scripting a Posner Cueing experiment in Spyder and using PsychoPy to run it. I am currently trying to log the data i enter into an excel file but have encounte…

---

## [Alert 4210: JavaScript Syntax Error in 'Begin JS Experiment' tab. See 'Line 1: Unexpected token' in the 'Begin JS Experiment' tab](https://discourse.psychopy.org/t/alert-4210-javascript-syntax-error-in-begin-js-experiment-tab-see-line-1-unexpected-token-in-the-begin-js-experiment-tab/28264)

<div class="topic-metadata">

**Author:** [@RebekahSchneider](https://discourse.psychopy.org/u/RebekahSchneider)\
**Replies:** 5\
**Last updated:** [March 30, 2022, 11:54pm UTC](https://discourse.psychopy.org/t/alert-4210-javascript-syntax-error-in-begin-js-experiment-tab-see-line-1-unexpected-token-in-the-begin-js-experiment-tab/28264 "2022-03-30T23:54:34Z")

</div>

OS : macOS Monterey v. 12.1 PsychoPy version : v2022.1.1 Standard Standalone? (y/n) If not then what?:y What are you trying to achieve?: I recently got a new computer, downloaded the newest version of PsychoPy, and tr…

---

## [Experiment stops before routine](https://discourse.psychopy.org/t/experiment-stops-before-routine/25456)

<div class="topic-metadata">

**Author:** [@Carina\_Cretu](https://discourse.psychopy.org/u/Carina_Cretu)\
**Replies:** 4\
**Last updated:** [October 18, 2021, 5:17pm UTC](https://discourse.psychopy.org/t/experiment-stops-before-routine/25456 "2021-10-18T17:17:23Z")

</div>

Hi there, I’m trying to build an experiment (using builder only, not very confident with coding) and as I run it, it passes the first image routine but stops right before the second. I’m using loops with all of my routin…

---

## [403 Forbidden error while opening the task link](https://discourse.psychopy.org/t/403-forbidden-error-while-opening-the-task-link/23859)

<div class="topic-metadata">

**Author:** [@Kshitij\_Kumariit](https://discourse.psychopy.org/u/Kshitij_Kumariit)\
**Replies:** 4\
**Last updated:** [July 3, 2021, 10:40pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-while-opening-the-task-link/23859 "2021-07-03T22:40:05Z")

</div>

Description of the problem: After uploading the experiment when i click on the task link it says : 403 Forbidden. while when i go to pavlovia to see whats wrong i get this error: unable to pull project from GitLab rep…

---

## [Psychopy error message when running experiment using randomization in builder](https://discourse.psychopy.org/t/psychopy-error-message-when-running-experiment-using-randomization-in-builder/21939)

<div class="topic-metadata">

**Author:** [@fiqbal098](https://discourse.psychopy.org/u/fiqbal098)\
**Replies:** 7\
**Last updated:** [July 1, 2021, 9:32am UTC](https://discourse.psychopy.org/t/psychopy-error-message-when-running-experiment-using-randomization-in-builder/21939 "2021-07-01T09:32:06Z")

</div>

Hi everyone, I am receiving an error message that I have not seen before and can not find much info on “trial handler” errors. I would appreciate any help. Thank you in advance. OS (e.g. Win10): Mac 10.13.6 PsychoPy v…

---

## [Error when uploading experiment to Pavlovia](https://discourse.psychopy.org/t/error-when-uploading-experiment-to-pavlovia/21053)

<div class="topic-metadata">

**Author:** [@pkcgofight](https://discourse.psychopy.org/u/pkcgofight)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 6:48am UTC](https://discourse.psychopy.org/t/error-when-uploading-experiment-to-pavlovia/21053 "2021-03-24T06:48:18Z")

</div>

System: Win 10 Version: 2021.1.2 Description: The experiment works great in the Builder mode. But when I upload my experiment to Pavlovia.ory, it came out an error like that: Traceback (most recent call last): File …

---

## [Error in variable names](https://discourse.psychopy.org/t/error-in-variable-names/20202)

<div class="topic-metadata">

**Author:** [@daisyjane1008](https://discourse.psychopy.org/u/daisyjane1008)\
**Replies:** 9\
**Last updated:** [February 15, 2021, 11:15am UTC](https://discourse.psychopy.org/t/error-in-variable-names/20202 "2021-02-15T11:15:17Z")

</div>

I have my experiment saved next to my Excel sheet in the same folder on my desktop. When I try to run it, I get the Name error “Name ‘cue’ is not defined”. Below is a screenshot of my excel sheet and the error that appea…

---

## [Unhandled internal error: SyntaxError: invalid syntax](https://discourse.psychopy.org/t/unhandled-internal-error-syntaxerror-invalid-syntax/16700)

<div class="topic-metadata">

**Author:** [@arnon\_weinberg](https://discourse.psychopy.org/u/arnon_weinberg)\
**Replies:** 8\
**Last updated:** [December 14, 2020, 10:05pm UTC](https://discourse.psychopy.org/t/unhandled-internal-error-syntaxerror-invalid-syntax/16700 "2020-12-14T22:05:15Z")

</div>

Clicking File \> Export HTML, I get the unhandled internal error popup with: Traceback (most recent call last): File "/home/arnon/temp/MAD/psychopy4/lib64/python3.6/site-packages/psychopy/app/builder/builder.py", line …

---

## [No error message after updating](https://discourse.psychopy.org/t/no-error-message-after-updating/17524)

<div class="topic-metadata">

**Author:** [@BaharSener](https://discourse.psychopy.org/u/BaharSener)\
**Replies:** 0\
**Last updated:** [October 25, 2020, 7:46pm UTC](https://discourse.psychopy.org/t/no-error-message-after-updating/17524 "2020-10-25T19:46:28Z")

</div>

I had this experiment designed and then I was able to run it online with Pavlovia. I just re-downloaded the psyexp file to work on it to modify to make it suitable for children. When I downloaded it I couldn’t work on th…

---

## [Troubleshooting](https://discourse.psychopy.org/t/troubleshooting/16112)

<div class="topic-metadata">

**Author:** [@LO123](https://discourse.psychopy.org/u/LO123)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 8:30am UTC](https://discourse.psychopy.org/t/troubleshooting/16112 "2020-09-02T08:30:46Z")

</div>

Hi all, Have recently moved offices and had to go through installing PsychoPy and bringing my files over to another computer setup. I now received the following message when trying to run an experiment and can’t view a…

---

## [Feedback code component 'syntax error'](https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630)

<div class="topic-metadata">

**Author:** [@s.bassoon](https://discourse.psychopy.org/u/s.bassoon)\
**Replies:** 1\
**Last updated:** [June 29, 2020, 11:16am UTC](https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630 "2020-06-29T11:16:16Z")

</div>

I am running PsyhcoPy 2020, windows 10. I have a routine for presenting an audio stimulus, followed by a routine for providing feedback on whether the participant is correct and their response time: However, the code…

---

## [TypeError: Cannot read property 'addData' of undefined + defining variables](https://discourse.psychopy.org/t/typeerror-cannot-read-property-adddata-of-undefined-defining-variables/13770)

<div class="topic-metadata">

**Author:** [@BaharSener](https://discourse.psychopy.org/u/BaharSener)\
**Replies:** 7\
**Last updated:** [June 2, 2020, 8:37pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-property-adddata-of-undefined-defining-variables/13770 "2020-06-02T20:37:13Z")

</div>

Hello, I’ve been working on getting this memory task to work online. The url of the experiment is: Pavlovia and the repository is public. On an earlier version of this project I was getting a lot of reference errors so …

---

## [Specifying a custom trial list in PsychoJS](https://discourse.psychopy.org/t/specifying-a-custom-trial-list-in-psychojs/13039)

<div class="topic-metadata">

**Author:** [@ivab](https://discourse.psychopy.org/u/ivab)\
**Replies:** 3\
**Last updated:** [May 10, 2020, 5:18am UTC](https://discourse.psychopy.org/t/specifying-a-custom-trial-list-in-psychojs/13039 "2020-05-10T05:18:46Z")

</div>

URL of experiment: Description of the problem: Hello, I am trying to convert a Psychopy experiment, created in Builder, to PsychoJS and run on Pavlovia. The Python custom code was working as it was supposed to but …

---

## [Problem running experiment via pavlovia](https://discourse.psychopy.org/t/problem-running-experiment-via-pavlovia/12856)

<div class="topic-metadata">

**Author:** [@Ram-Maha](https://discourse.psychopy.org/u/Ram-Maha)\
**Replies:** 9\
**Last updated:** [April 30, 2020, 9:00pm UTC](https://discourse.psychopy.org/t/problem-running-experiment-via-pavlovia/12856 "2020-04-30T21:00:34Z")

</div>

URL of experiment: https://run.pavlovia.org/maha10/dummy/html Description of the problem: I followed all the steps uploading files on to gitlab, but when i try to pilot i dont see anything on screen. The Experiment runs…

---

## [Syntax error when working with Auto -\> JS](https://discourse.psychopy.org/t/syntax-error-when-working-with-auto-js/12845)

<div class="topic-metadata">

**Author:** [@BaharSener](https://discourse.psychopy.org/u/BaharSener)\
**Replies:** 3\
**Last updated:** [April 28, 2020, 8:13pm UTC](https://discourse.psychopy.org/t/syntax-error-when-working-with-auto-js/12845 "2020-04-28T20:13:42Z")

</div>

URL of experiment: https://run.pavlovia.org/lcdlab/spatial-memory/html Description of the problem: Hello! I am trying to run this study online. Initially I had problem running it because I did not change the code type …

---

## [Timer syntax errors?](https://discourse.psychopy.org/t/timer-syntax-errors/12450)

<div class="topic-metadata">

**Author:** [@sallicap](https://discourse.psychopy.org/u/sallicap)\
**Replies:** 2\
**Last updated:** [April 16, 2020, 1:35pm UTC](https://discourse.psychopy.org/t/timer-syntax-errors/12450 "2020-04-16T13:35:45Z")

</div>

Hi, I am trying to create an adaptive staircase & it seems to be going fine except for the fact that I get the following errors: routineTimer.reset() ^ SyntaxError: invalid syntax If I then remove that l…

---

## [OSError: exception: access violation reading 0x00000010](https://discourse.psychopy.org/t/oserror-exception-access-violation-reading-0x00000010/5843)

<div class="topic-metadata">

**Author:** [@Martin](https://discourse.psychopy.org/u/Martin)\
**Replies:** 0\
**Last updated:** [November 15, 2018, 9:35am UTC](https://discourse.psychopy.org/t/oserror-exception-access-violation-reading-0x00000010/5843 "2018-11-15T09:35:01Z")

</div>

OS: Win7 PsychoPy version: first tried 1.90.2, but the same for 3.0.0b11, Standard Standalone What did you try to make it work?: tried multiple runs, reworked whole experiment (3x), tried to isolate the issue. What s…

---

## [Please Help with AL lib: (EE) alc\_cleanup: 1 device not closed and Stroop test](https://discourse.psychopy.org/t/please-help-with-al-lib-ee-alc-cleanup-1-device-not-closed-and-stroop-test/2089)

<div class="topic-metadata">

**Author:** [@awai](https://discourse.psychopy.org/u/awai)\
**Replies:** 8\
**Last updated:** [October 11, 2017, 5:45am UTC](https://discourse.psychopy.org/t/please-help-with-al-lib-ee-alc-cleanup-1-device-not-closed-and-stroop-test/2089 "2017-10-11T05:45:59Z")

</div>

I followed this youtube tutorial by Jon to build a stroop test (https://www.youtube.com/watch?v=VV6qhuQgsiI) but I have these errors when I run the experiment. When I run I can see the instructions page successfully but …

[Next page](https://discourse.psychopy.org/tag/syntaxerror/38.md?match_all_tags=true&page=1&tags%5B%5D=syntaxerror)
