Self-paced reading task// A bug in the flow

Python.psyexp (10.5 KB)

Dude,
I changed that thing to constant,
I entered a space in the text box,
modified the code,
still not working. So I figured I share the file for you to see what’s wrong. When I run the experiment, it shows the grey background of PsychoPy and even the system stops working!
I really appreciate your help and sorry that it took so long.

Sorry but I get an error “TypeError: Can’t represent a Param of type color” which I think may be related to " WARNING Parameter ‘contrast’ is not known to this version of PsychoPy but has come from your experiment file (saved by a future version of PsychoPy?). This experiment may not run correctly in the current version."

I’m using 2020.2.10 still.

I’m not sure it’s a good idea to call your experiment and Excel file Python.

What error message are you getting?

yeah, I assume I downloaded the latest version of PsychoPy.
There’s no error. But when I run it, my laptop locks up. I don’t have a very powerful CPU, but I didn’t face this problem when running the experiment with that Java code or that inefficient flow of mine. It’s weird.

ps: As for the name of the file, yeah I know. It’s just that I have three outputs and I wanted to differentiate them from one another. Now, I’m just testing things.

Isn’t there any easy way to do this? :slight_smile:

Are you trying to run it online?

Your code elements are set to Py, not Auto.

Locking up sounds like a routine that won’t end. Try adding a mouse component to your main trial so you can advance on a click if the keyboard doesn’t work.

Morning :slightly_smiling_face:
Eventually, yes. I will conduct it on Pavlovia.
no worries about that; I synced this PsychoPy file with Java code on Pavlovia and it seemed okay. Except for the error :))
Speaking of py elements, I forgot to attach that and my excel file for you to see. i assume it won’t be possible for you to run the experiment without them. I know it’s a long shot but here they are.
Python.psyexp (10.5 KB) Python.xlsx (8.7 KB) Python_lastrun.py (13.1 KB)

Try this experiment file (which I’ve recreated from scratch and works for me).Python.psyexp (11.9 KB)

I’ve added code to stop the space on the welcome screen counting in the self paced reading and also code to save the response time for each word.

Dear wakecarter
Thanks a million :heart_eyes: yeah, it’s finally working!!
There’s only one point: I need the sentence to be displayed in a noncumulative fashion. In the way you designed the experiment, the sentences are presented cumulatively. Is there a way to change that too?

text.text=words[wordNum]

You don’t need to use the variable phrase

Finally working!! Aww I can’t thank you enough. you are lifesaver. thank you thank you :shamrock:

The easiest option would be to add a column in your sentence spreadsheet containing the name of the CSV file containing the items and answer options for a form component.

The form component isn’t great online but choice item types do work.

Thank you. I’ll see where it goes.

I’ve just updated my demos with a self-based reading task using your sentences, so I’d recommend that you start again by forking it.

Self-Paced Reading code | try it | discussion thread

Based on code from my code snippets Google page and using sentences from @Zeinab_Alipour, this demo includes reading times for each word and an editable text box comprehension question.

Dear @wakecarter,
it looks great!! thank you :herb:

But I don’t want to fork it, because there are things I’d like to change. Like its randomness, i want it to read sentences in a sequential manner. Or i wish the fixation cross stay there for 0.5 second, and finally I want it to end; so I need to set time for that too.

And I checked your github profile and downloaded the builder view of this experiment and all that jazz, but I can’t push it to Pavlovia, as while doing so, I receive an error-like message. (Also, I want to build the exact same experiment with a different excel file, for counterbalancing purposes.)

I think I should rewrite everything and then push that experiment to Pavlovia. what’s your take on this?

Bests,
Zeinab

You should fork it, check it works and then change it.

I added a key press to the fixation because it felt wrong with .5 seconds to me.

If you want to counterbalance sentences you should do it within a single experiment, not create a duplicate.

Very well. Thank you @wakecarter, I forked the experiment and mind you, I have a couple of questions to ask:

  1. So should i clone it to be able to edit it? And should I do that in github?

Why?
3)

How? In that website of yours?
I pseudorandomized the items for each set and they are different. So can I do this there? And I went them to be sequentially presented because no two target items should follow each other you know.

  1. I haven’t tied cloning. I expect you can fork, clone or simply download.
  2. I kept feeling surprised by the sentences. Maybe 1 second of blank before the .5s fixation would work.
  3. You can make the loop sequential. If the only difference between versions is the Excel file that can be done in code at the start of the experiment based on the value of paricipant or group send m=by one of my apps.

Morning :herb:
3. Ok, I’m sorry I didn’t get it. Mind you, i just upload the files so that you can see whether a code can be a panacea for this or not.
Demo3,a.xlsx (12.6 KB)
Demo3,b.xlsx (11.3 KB)
2. hmm… interesting. Well you won’t if the order were sequential. The first three items served as warm-ups so they knew exactly what to expect after each question. But thank you for bringing that up.

  1. Just the last question, I’ll figure this forking thing out, but how do I make changes when I’ve already uploaded the file or forked the project to my Pavlovia account? Where can i edit it? in gitlab?

Regards,
Zeinab

I’ve made the changes you wanted to my demo

It now selects the excel based on the group (though this could be deleted from expInfo if you want to use participant – I’ve coded it for both). The two Excel files are now Demo3_1.xlsx and Demo3_2.xlsx

I’ve made a short (.5s) blank in between sentences and made the sentences appear sequentially.

Here are notes on how to find the experiment via the Builder Searching for experiments on Pavlovia — PsychoPy v2021.1

1 Like

Awww. thank you @wakecarter, genuinely thank you.

Just two last questions (hopefully),

  1. To find the experiment via the Builder, I followed the instructions in Searching for experiments on Pavlovia — PsychoPy v2021.1. But I couldn’t sync it for

    this reason. Everything looks perfect, I just want to set a time, like 2 sec, for the Fin slide to be actually finished.
  2. While i was surfing the literature, i found that some scholars used the moving window display to display their sentences word-by-word. It would be sth like this and it was feasible via E-prime:
    the first segment appeared at the left edge in the vertical middle of the screen. At the next push of the key, the first segment disappeared and the second segment appeared to the right of the now-gone segment. All sentences fit on one line.

Is it possible to do that in psychopy as well? Because when the sentences are presented from left to right, perhaps it becomes more like what happens in the real world while reading.

Best,
Zeinab

  1. The last line of the error message (which I can’t see) tends to be the most informative.

  2. That’s doable though tricky to get perfect because of kerning (letters don’t all take up the same horizontal space).

If you buy a “Fix that Bug” from me via my buymeacoffee page then I’d be happy to give it a go.