Merge conflict and "this file doesn't belong to any existing project" error

URL of experiment:


Description of the problem: When I am trying to sync my PsychoPy experiment (task 1) with Pavlovia I get a message that says that it doesn’t belong to any project. I tried to create a new project and then I could sync once, but then it stopped working again. Then I tried to sync through → Search Pavlovia → Browse the folder and then sync (on Builder), but then I get the following error:
" Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\”, line 364, in onSyncButton
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\”, line 651, in sync
status = self.pull(infoStream=infoStream)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\”, line 694, in pull
raise e
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\”, line 685, in pull
info = self.repo.git.pull(self.remoteWithToken, ‘master’)
File “C:\Program Files\PsychoPy3\lib\site-packages\git\”, line 548, in
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\git\”, line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\git\”, line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd(‘C:\Program Files\PsychoPy3\MinGit\cmd\git.exe’) failed due to: exit code(1)
cmdline: C:\Program Files\PsychoPy3\MinGit\cmd\git.exe pull master
stdout: ‘Updating 410d88d…80e963a’
stderr: 'From

  • branch master → FETCH_HEAD
    error: Your local changes to the following files would be overwritten by merge:
    Please commit your changes or stash them before you merge.
    Aborting’ "

I guess that this is because I edited the task_1.js file on Gitlab, but not locally on my computer, so there is one task_1.js file locally and another one online. However, even though I cannot sync through PsychoPy, when I run the experiment online, it works as I want it to (i.e. WITH the changes that I made in task_1.js). On the other hand, my second experiment (see second link above), doesn’t give me this error when I sync through PsychoPy, even though I made the same changes in the task_2.js file online (and not locally). In this case, though, when I run the experiment online, I don’t see the result of the changes I made.
How do I go about merging the two different files in order to successfully sync from now on?
Sorry, but I am very new to gitlab and programming, and all my attempts to look up an answer failed. I also tried to push the changes by using the “git push” command, but if I understand correctly the changes are already on gitlab, but do not exist locally.

Unless you know what and why you’re doing it, you shouldn’t be making edits to your files online. Make changes locally in Builder and then sync then.

At this stage you might be able to sync project 1 if you can work out how to commit or abandon your online changes.

However, the easiest option would be to either delete you local hidden. .git folder in your experiment folder or copy your psyexp file and resources to a new local folder and sync to a new project.

Thanks for your answer. I actually did copy my experiment to a new local folder and tried to sync to a new project, but I got this error:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\”, line 161, in submitChanges
self.parent.project = self.project
AttributeError: ‘NoneType’ object has no attribute ‘project’

Then, despite the error, the project was indeed created, and when I tried to sync, I got this:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 1221, in onPavloviaSync
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\”, line 719, in fileExport
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\”, line 42, in generateScript
print(“Generating {} script…\n”.format(target))
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\runner\”, line 888, in write
StdOutRich.write(self, inStr, evt)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\”, line 40, in write
self.MoveEnd() # always ‘append’ text rather than ‘writing’ it
RuntimeError: wrapped C/C++ object of type StdOutText has been deleted

Any idea how to solve this? Thanks in advance.