"PsychoPy encountered an unhandled internal error" when producing JS code to push to Pavlovia

Hi Becca,
I just wanted to follow up with you before the holiday season on whether you had any recommendations regarding next steps for resolving these issues I’ve been having.
Thanks!
Mariya

Hi Mariya,

After looking into this, I I see your problem, you had ‘$’ symbols in your conditions file and that caused an error when compiling the resources list to use online. I replaced the feedback with images instead and that compiles fine. I have added you to the now syncing project, I suggest you fork this or make a copy of that to work from.

As I assumed you were wanting to run this online, I started debugging some separate issues I noticed:

  1. I replaced your choose function with an outer loop, since it looked as though the purpose of this was to select your condition block and that can be done more easily and bug free with an outerloop.
  2. several variables needed defining to run online e.g. thisExp (see crib sheet for details) and your ‘px’ variable.

At this point I stopped debugging as I didn’t want to go too far with your experiment as I am sure you want full control over it’s development! For this reason, there will still be some JS errors when you run it - but I recommend viewing the crib sheet etc (which I know you are already familiar with!) and if you do encounter other issues start a new thread for those.

For now though, I think this resolves the current issue which was 'SyntaxError: unexpected EOF while parsing’

I hope this helps - thank-you for your patience!
Becca

Hi Becca,
Thank you so much! I would never have thought that the ‘$’ symbols in the condition file were causing the problem, but now that you mention this, it does make sense!
Have a happy and safe holiday season!
Mariya

You have a safe and happy holiday season too Mariya! Pleased we finally pinned down the problem!

Becca

Hi Becca,
I am trying to debug and troubleshoot some of these JS issues, but I ran into the issue that I’m not allowed to push my changes to the remote: please see the message below. I know that you recommended I fork the version of the project you pushed to Pavlovia (lpxrh6/reinforcementlearning), but I wasn’t sure how I could do it since lpxrh6/reinforcementlearning is already a fork of my repo ReinforcementLearning. Should this be handled through a merge request or mirroring or something like that? Please let me know how to go about resolving this issue.
Thanks!
Mariya

https://oauth2:98c57460370bbec6df578aaaac867990bc0fdebc9329b90a20e360b675046a34@gitlab.pavlovia.org/lpxrh6/reinforcementlearning.git master
stderr: ‘remote: GitLab: You are not allowed to push code to protected branches on this project.
To https://gitlab.pavlovia.org/lpxrh6/reinforcementlearning.git
! [remote rejected] master → master (pre-receive hook declined)
error: failed to push some refs to ‘https://oauth2:98c57460370bbec6df578aaaac867990bc0fdebc9329b90a20e360b675046a34@gitlab.pavlovia.org/lpxrh6/reinforcementlearning.git’’

Aha, yes that could cause an issue, in that case are you able to download the repo and push it as a new project instead?

All the best,
Becca

Yes, that works, thank you!