I am trying to use Pavlovia and I am new to it. The problem I am getting is when I am trying to export HTML of my experiment, an HTML folder is getting created, sure, but it has nothing in it. There might be something I might be doing wrong? Any help would be appreciated.
Thanks
Edit: The error is typed here:
> Traceback (most recent call last):
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\builder.py", line 2262, in onPavloviaSync
> self.fileExport(htmlPath=self._getHtmlPath(self.filename))
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\builder.py", line 1682, in fileExport
> target="PsychoJS")
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\builder.py", line 2241, in generateScript
> psyexpCompile.compileScript(infile=self.exp, version=None, outfile=experimentPath)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\scripts\psyexpCompile.py", line 51, in compileScript
> script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\_experiment.py", line 145, in writeScript
> self.settings.writeInitCodeJS(script, self.psychopyVersion, localDateTime, modular)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\components\settings\__init__.py", line 445, in writeInitCodeJS
> self.prepareResourcesJS()
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\components\settings\__init__.py", line 434, in prepareResourcesJS
> resourceFiles = self.exp.getResourceFiles()
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\_experiment.py", line 733, in getResourceFiles
> condsPaths = findPathsInFile(params['conditionsFile'].val)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\_experiment.py", line 716, in findPathsInFile
> subFile = getPaths(val)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\_experiment.py", line 665, in getPaths
> thisFile['rel'] = os.path.relpath(filePath, srcRoot)
> File "C:\Program Files (x86)\PsychoPy3_PY2\lib\ntpath.py", line 529, in relpath
> % (path_prefix, start_prefix))
> ValueError: path is on drive 0:, start on drive D:
Both the experiment and the conditions files are stored in D: drive; and the Standalone Psychopy is stored in C: drive.
My experiment has multiple conditions file (6 in total) and only one experiment running 6 loops. Also, the experiment is running perfectly a-okay in the offline mode.
I think the problem is the way you’ve specified the location of some files in your conditions files. PsychoPy is trying to find the relative location between them but there isn’t one. Maybe you wrote D:\foldername\filename as the path rather than just putting its location relative to the experiment?
My experiment is created in six blocks, which uses stimuli conditions file, selecting the row stimulus at random in three types of emotions, i.e. positive, negative and neutral emotions, with each emotion being depicted from another file, which contains the location of the images displaying emotions, which is looped as trials, and the images are stored in a folder inside the location of the experiment. Attached are two of the stimulus and location xlsx file.
I did have to write the path because the images were not in the same folder as the experiment, rather in another folder which is in the same folder as the experiment. But the path does not start from the drive name, rather than the image folder name, as they are in the same folder of the experiment.
Can you help me what is wrong? Because the experiment works perfectly in offline builder mode locally.
I am attaching the experiment psyexp file too for your reference. Maybe you could ask @apitiot to help me with this problem? I am sorry for continuously bothering you all, but I am new to Psychopy and Pavlovia, and codings in general, so help would be greatly appreciated. Do let me know if you need something else for further reference.
This is the only error it is showing, when I use “Export HTML”. Also, in the HTML folder, nothing is getting added. In the previous Psychopy version, it was showing the errors shown in the initial query, maybe that would help?
Also I would like to add that the experiment is working perfectly fine in the offline mode in builder. I have also attached my experiment psyexp file and two conditions file where I have to change paths, if you might want to check where the fault might be in the experiment.
I am sorry for bothering you again. I was wondering if the manual addition of files in the HTML folder would do the trick? Is there any other way to Export HTML other than using the icon from the software?
Hi, sorry I thought the error was coming from the experiment code and didn’t realise it was arising from the generation of the experiment/the uploading process.
So this is probably a question for @jon. But I see he was querying earlier in this thread your use of file paths. You should probably show us those.
I understand that the problem is in the conversion of psyexp into HTML content, because in offline builder mode it works well.
I have attached the psyexp file and the conditions file where I had to change the paths. I will attach it here again, along with the rest of the conditions files, in case it is lost.
@Shardul_Shankar, the 519.4192 ERROR path is on mount '0:', start on mount 'D: is actually because of the use of colons in the conditions file, to define your row selections. We have a fix created on Github, but in the mean time, you can change your row indices to be two separate columns, with row start and row end as your columns, then in your loop, set the selected rows as $rowStart:rowEnd. See attached conditions file as an example