| Reference | Downloads | Github

HTML folder not getting created for online experiment

Hi all,

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.


Edit: The error is typed here:

> Traceback (most recent call last):
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\", line 2262, in onPavloviaSync
>     self.fileExport(htmlPath=self._getHtmlPath(self.filename))
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\", line 1682, in fileExport
>     target="PsychoJS")
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\app\builder\", 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\", line 51, in compileScript
>     script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\", 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\", line 445, in writeInitCodeJS
>     self.prepareResourcesJS()
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\components\settings\", line 434, in prepareResourcesJS
>     resourceFiles = self.exp.getResourceFiles()
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\", line 733, in getResourceFiles
>     condsPaths = findPathsInFile(params['conditionsFile'].val)
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\", line 716, in findPathsInFile
>     subFile = getPaths(val)
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\experiment\", line 665, in getPaths
>     thisFile['rel'] = os.path.relpath(filePath, srcRoot)
>   File "C:\Program Files (x86)\PsychoPy3_PY2\lib\", line 529, in relpath
>     % (path_prefix, start_prefix))
> ValueError: path is on drive 0:, start on drive D:

Hi @Shardul_Shankar, wondering which drive your experiment and conditions files are stored?

Hi @dvbridges,

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.

Hi @dvbridges, should I move my experiment in C: drive? It does not logically make any sense, but I could try.

@jon can you recommend anyone who can help me out with this? Thanks in advance.

Also can you help me out in this? I am not able to find a solution to both these problems.

Link: Builder is not able to open the icon of online experiment once closed

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?

Thank you for replying @jon

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.

image_stimuli_Test3.xlsx (9.4 KB)
Main_Stimuli_Test3.xlsx (9.8 KB)
Pilot_test_demo.psyexp (137.9 KB)

Edit: This is the error on Psychopy v3.1.3-
519.4192 ERROR path is on mount '0:', start on mount 'D:'

Please provide the full error message. It should include information on what line of code the error is actually occurring on.

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.

Hi @Michael,

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?

Thanks in Advance

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.

Hi @Michael,

Thanks for replying here.

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.

image_stimuli_Test1.xlsx (11.0 KB)
image_stimuli_Test2.xlsx (10.4 KB)
image_stimuli_Test3.xlsx (9.4 KB)
image_stimuli_Test4.xlsx (9.4 KB)
Image_Stimuli_Test6.xlsx (9.7 KB)
Main_Stimuli_Test3.xlsx (9.8 KB)
Main_Stimuli_Test4.xlsx (9.9 KB)
Pilot_test_demo.psyexp (152.1 KB)

I have attached all the conditions file and the complete original psyexp file for your reference.

@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

image_stimuli_Test3.xlsx (9.5 KB)

1 Like