How to run a psyexp file written in 1.79 on 3.0?

OS: Ubuntu 18.04.3
PsychoPy version : 3.0.2
**Standard Standalone? (y)
What are you trying to achieve?:
I am trying to run a psyxep file written by other researchers as a part of my protocol. The experiment was writtten in Psychopy v. 1.79 But it seems that it does not run on Psychopy v.3.
Is it possible to adapt the script? Is it better (and faster) to install Psychopy2? In that case what is the procedure?
Sorry if this was asked before, but I could not find a similar question.
Tks

@marimoga, could you please provide details about why it does not run on more recent versions of PsychoPy? If we can address the errors, you should be able to get things working correctly.

Apparently, it’s calling the file from a different folder. I’m not sure why, though.
It’s calling the csv file at /home/mariana/BeatPerception_v10.csv instead of the correct location:

/home/mariana/Documents/UFABC/MESTRADO/PROJETO 2019/Metodologia/GoldMSI/BeatPerception/BeatPerception_v10.csv

Thanks, what happens if you go the the relevant loop, browse for the file again in the new version of PsychoPy, and choose the current location of the file? Do you still get the same error?

Yes. And also, it’s not compiling. So I can’t see the proper code. This is what I get when try to compile:

That error suggests that the stop value for one of your sound components is a string, rather than a piece of code that is trying to get the sound duration as a number. You may want to try the following, making sure that there are no single or double quotes around the statement:

$sound_1.getDuration()

Screenshot%20from%202019-11-11%2010-47-11

I can’t access the .py file. In the folder there is a ‘last run.py’ file from the author.
in this one I can see this:
Screenshot%20from%202019-11-11%2010-53-06

Ah, I see. You can do this amendment from Builder. If you open your sound component dialog box, and see if there is a string in the Stop field of the sound component. Either way, replace it with the code above and try again.

It’s still calling from this other folder (that doesn’t even exist). Also, I’ve tried to create the folder with the same path it called with the csv inside. I didn’t work the same way

Would you mind sharing your psyexp file?

I am not the author, but since the file is available on a open website I do believe I could share it.beatperception.psyexp (26.7 KB)

Ok, looks like there is some issue with the path of the conditions file. When I open it, I see

../../../../../../../BeatPerception_v10.csv

This will go up 7 directories to find your conditions file, rather than the current directory. So try typing in:

./BeatPerception_v10.csv

So, I changed the path . When tried to run it I got this:

ACtually, would you mind just zipping your experiment and sharing with me so I can run the task? Alternatively, share the URL to the online repository. I will need all conditions files and stimuli to run the task.

Sure. You can download the material here: GoldMSI Psychopy scripts
Also, you can find the documentation on this website
Materials for Download, GoldMSI

Ok, well try this instead, this runs for me now. I deleted your code in the code component, which appeared to create a sound component that with the same name as the one being created by Builder. Then, I deleted the sound_1 duration, because you were either trying to set the duration to 1, in which cause use the value 1, or you were trying to set the duration as the length of the sound file, in which case this is the default value if left blank.

beatperception.psyexp (26.6 KB)

Ok so after the 1 screen I got this:

Thanks, did you download and run the version I sent?

Yes, I did. But that was the output

Thanks, just checking. sound1 is a variable in your conditions file, I think that probably means that the conditions file was not actually loaded, because your variables from the conditions file are not available. Try browsing for the conditions file again from the loop handler, rather than typing in the value.Since we have fixed the other error in compiling it, it may work. If it does not, then there is an issue with how your installation of PsychoPy is finding the files, possibly through some interaction with your Anaconda environment.