Unable to run experiment online, Permission error

Description of the problem:
When I try to pilot experiment online, a white screen appears.

When I try to run experiment on a local browser with PsycoJS I get a white sceen with an Error respone: Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.

When I try to compile the experiment to JS script i get:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 804, in fileExport
self.generateScript(experimentPath=exportPath,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 71, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 245, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 217, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment_experiment.py”, line 286, in writeScript
self_copy.settings.writeInitCodeJS(script, self_copy.psychopyVersion,
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\components\settings_init
.py", line 857, in writeInitCodeJS
with open(os.path.join(folder, “index.html”), ‘wb’) as html:
PermissionError: [Errno 13] Permission denied: ‘C:\stroop\index.html’

I saw a forum about OneDrive and removed and changed the location of my files from it but still get the permissionerror.
Any ideas why?Thanks

Hi There,

This does indeed look like psychopy is struggling to write the html to the current location of your experiment (and online that means there will be no experiment to run) - do you also get the error when you select the yellow JS button? :compile_js: ? this should manually compile the index.html file.

Thanks,
Becca

Hi Becca, thanks for the reply,
Yes, this error shows only when I press the yellow JS button.
Any suggestions on what to do?
Thanks

OK - that does unfortunately seem like psychopy doesn’t have permission to write to that area - are you on an institutional device? where you might need admin privileges to write? you mentioned moving your files from onedrive - where did you move them to?

Becca

I moved the files to my local hard drive, still nothing, tried changing the location and permissions.

I did moved the files to my local :C and when i try to run the experiment online its says:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\exceptions.py”, line 304, in wrapped_f
return f(*args, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\mixins.py”, line 112, in get
server_data = self.gitlab.http_get(path, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\client.py”, line 662, in http_get
result = self.http_request(
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\client.py”, line 628, in http_request
raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 Project Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 663, in project
self._project = self.session.gitlab.projects.get(self.id)
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\v4\objects\projects.py”, line 782, in get
return cast(Project, super().get(id=id, lazy=lazy, **kwargs))
File “C:\Program Files\PsychoPy\lib\site-packages\gitlab\exceptions.py”, line 306, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Project Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 1380, in onPavloviaRun
pavlovia_ui.syncProject(parent=self, project=self.project)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\pavlovia_ui\project.py”, line 743, in syncProject
if not project.localRoot or not Path(project.localRoot).is_dir():
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 746, in localRoot
if self.project.path_with_namespace in knownProjects:
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py”, line 666, in project
raise KeyError(f"Could not find GitLab project with id {self.id}.")
KeyError: ‘Could not find GitLab project with id 261523.’

I don’t think it works to literally move files from one folder to another. If you want to sync to a different local folder you should search for the Gitlab repository and sync.

https://psychopy.org/online/sharingExperiments.html

Hello,
did you maybe find a solution to this? I can’t seem to overcome this problem and I cannot push and of my experiments to Pavlovia anymore. I am using an institutional pc, and I also tried moving files to a local folder on C:. Weirdly, same thing happens to my students, who don’t use institutional PCs but they might still save their experiments in the same network, I’m not quite sure yet if it applies for all of them. Really struggling here to help them get their assignments working.

@Becca

Could you elaborate on this, please? I followed the steps concerning the sync but noting changed…

Please could you list the steps you followed?

Hello Wake,
thank you for responding. I tried to sync my Pavlovia project to a different local folder via the search dialog in the builder, but that didn’t work.

What did work eventually was to a) delete the .git file in the folder which linked to the broken online experiment b) literally copy the exp. folder to a local destination and c) in my local experiment folder, resolve the folder named “index.html” in which the index.html file was “trapped” togehther with the .js file. This third step seemes necessary in more than one case, and I’m not certain why the path was “broken” in the first place.

So I basically did some trial and error and it eventually worked - three times, with three different devices & three experiments.