psychopy.org | Reference | Downloads | Github

Synchronizing to Pavlovia: 'Fingerprint has already been taken'


#1

Mac OS 10.13.6 High Sierra
PsychoPy v3.0.0b3

Hi all,

when trying to upload my experiment to Pavlovia.org (I have an account, am logged in in PsychoPy, and have created a project), a small window tells me PsychoPy is ‘synchronizing’. No files are uploaded though, and the window stays open indefinitely.

Here’s what the console reads:

Traceback (most recent call last):
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/psychopy/app/pavlovia_ui/toolbar.py", line 47, in onPavloviaUser
    userDlg = UserEditor()
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/psychopy/app/pavlovia_ui/user.py", line 43, in __init__
    self.user = pavlovia.User(gitlabData=self.user)
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/psychopy/projects/pavlovia.py", line 162, in __init__
    'key': self.publicSSH})
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/gitlab/exceptions.py", line 253, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body)
gitlab.exceptions.GitlabCreateError: 400: {u'fingerprint': [u'has already been taken']}

Does anyone else experience this error? Anyone with a clue as to what I might be missing here?

Much appreciated.

Felix


#2

Update: I tried synchronizing the experiment to Pavlovia from a different wifi, now the Console reads as follows (creating a new project called “fr”, the only project in my account):

"/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git remote add origin https://gitlab.pavlovia.org/Felix/fr.git
  stderr: 'fatal: remote origin already exists.'

#3

Thanks for the reports Felix. The root cause of the first error is that PsychoPy creates an SSH key with which to identify you and, somehow, it’s tried to upload a key that it had already created for you. Gitlab is telling PsychoPy not to add a second copy of the key. I’ll need to look into why PsychoPy tried to do that.

The error is that the step of creating the repository had succeeded but uploading the files had failed. Now when you tried a second time it complained that the project already existed. it’s more clear to me how this occurred and what we need to do to fix it (detect that the project exists but is currently empty and just perform the file sync or, maybe, we should have deleted the created project previously when the sync step failed so as not to leave an empty project at all).


#4

Hi Jon,

thanks a lot for getting back to me. Of course, it’s still a beta version, but I am very excited about the new online platform and features you’re adding.

Thank you so much for your effort! Much appreciated.

Cheers,
Felix


#5

Update: Have been able to solve the problem which results in this error:

"/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/git/cmd.py", line 825, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git remote add origin https://gitlab.pavlovia.org/Felix/fr.git
  stderr: 'fatal: remote origin already exists.'

The experiment needs to be in a ‘fresh’ local directory, i.e. a directory from which I haven’t tried pushing an experiment to pavlovia.

After installing Psychopy 3.0.0b4, I have been able to walk a bit further down the path to successfully pushing my experiment to pavlovia. I can’t use my uni’s wifi, else I get the SSH fingerprint error. If I connect at home (or via my phone), this error does not occur.

Following these steps, the little window displays “Pushing files to Pavlovia”, but the console reads a new error:

git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git push -u origin master
  stderr: 'fatal: could not read Username for 'https://gitlab.pavlovia.org': Device not configured'

Have double-checked that I am logged into pavlovia in psychopy, using the correct Username/Password.
Does anyone else experience this error?


#6

I’m having the same issue. I opened a thread here: Problems pushing updates/commits to pavlovia

To summarize, I am able to create a new project (and I can see it in pavlovia), but I am not able to upload my files.


#7

Update 3.0.0b7: The error concerning existing projects is solved.

However, the Username error persists. Syncing a project, the little window now reads

Pushing files to PavloviaTraceback (most recent call last):
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.py", line 455, in syncProject
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py", line 758, in firstPush
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 548, in <lambda>
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 1014, in _call_process
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 825, in execute
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git push -u origin master
  stderr: 'fatal: could not read Username for 'https://gitlab.pavlovia.org': Device not configured'

I get this error even though I am logged in (double-checked) and regardless whether I want to push my own experiment or a demo.


#8

Just wanted to add that I’m getting this error as well on 3.0.0b7 and Max OS 10.13.6 High Sierra. I’m not familiar with git, so I’m not sure what’s going wrong.


#9

I am getting the same error using PsychoPy 3.0.0b9 on a MacOS High Sierra 10.13.6 when pushing my project to run online. The project was created on gitlab.pavlovia.org from the Builder but no files were pushed. Also, a new website opens but I get a 404 error page. I appreciate any tips on how to get my project running online.
Thanks!

The message I get is:

  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.py", line 455, in syncProject
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py", line 758, in firstPush
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 548, in <lambda>
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 1014, in _call_process
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 825, in execute
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git push -u origin master
  stderr: 'fatal: could not read Username for 'https://gitlab.pavlovia.org': Device not configured' ```

#10

I’m still not sure what could cause the “could not read Username” error. I assume this is still happening with 3.0.0b9?

I wonder if the user needs to have a username set up for the project with git config (which we could certainly do). What happens if you go to the folder of the project (using mac terminal) and do this using the same email address as the one for your account?

git config user.email your@email.com

Does that allow git push -u origin master to work?

If that helps then it would be easy for us to set up (in fact it might be a good idea anyway)


#11

Hi Jon,

you are correct, this issue persists in beta 9.

I just tried the solution you suggested and it works from terminal. However, syncing the project again via the Experiment Builder does not work after setting up the username via terminal.

Let me know if you need any further information.


#12

That’s very strange! And it has this same “could not read Username” error message?


#13

this is what terminal reads trying your solution, appears to be working

---:~ ---$ cd /Users/---/Desktop/fr7
---:fr7 ---$ git config user.email anonymized@email.com
---:fr7 ---$ git push -u origin master
Username for 'https://gitlab.pavlovia.org': anonymized@email.com
Password for 'https://anonymized@email.com@gitlab.pavlovia.org': 
Zähle Objekte: 55, Fertig.
Delta compression using up to 4 threads.
Komprimiere Objekte: 100% (52/52), Fertig.
Schreibe Objekte: 100% (55/55), 1.87 MiB | 3.89 MiB/s, Fertig.
Total 55 (delta 8), reused 0 (delta 0)
remote: 
remote: The private project Felix/frrrr7 was successfully created.
remote: 
remote: To configure the remote, run:
remote:   git remote add origin https://gitlab.pavlovia.org/Felix/frrrr7.git
remote: 
remote: To view the project, visit:
remote:   https://gitlab.pavlovia.org/Felix/frrrr7
remote: 
To https://gitlab.pavlovia.org/Felix/frrrr7.git
 * [new branch]      master -> master
Branch 'master' folgt nun Remote-Branch 'master' von 'origin'.

This is what PsychoPy 3.0.0b9 tells me right after trying the terminal solution:

Synchronising...
Pulling changes from remote...Traceback (most recent call last):
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.py", line 475, in syncProject
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py", line 607, in sync
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py", line 651, in pull
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py", line 642, in pull
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 548, in <lambda>
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 1014, in _call_process
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py", line 825, in execute
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git pull
  stderr: 'fatal: could not read Username for 'https://gitlab.pavlovia.org': Device not configured'

#15

I’m having a similar issue (v3.0.0b9) and can’t figure out where the root of the issue is. When I try to synchronize from Builder, nothing happens but the following is output appears in the Coder output box:

Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 2255, in onPavloviaSync
self.fileExport(htmlPath=self._getHtmlPath(self.filename))
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 1678, in fileExport
target=“PsychoJS”)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/builder/builder.py”, line 2233, in generateScript
out = subprocess.check_output(cmd)
File “subprocess.pyc”, line 336, in check_output
File “subprocess.pyc”, line 418, in run
subprocess.CalledProcessError: Command ‘[’/Applications/PsychoPy3.app/Contents/MacOS/python’, ‘-m’, ‘psychopy.scripts.psyexpCompile’, ‘/Users/Test/test1.psyexp’, ‘-o’, ‘/Users/Test/html/test1.js’, ‘-v’, ‘3.0.0b9’]’ returned non-zero exit status 1.

If I try to upload from Coder, the separate dialogue box that says “Synchronising…” appears quickly, but then very quickly says to the following.

Pushing files to PavloviaTraceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/app/pavlovia_ui/project.py”, line 455, in syncProject
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py”, line 758, in firstPush
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 548, in
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 1014, in _call_process
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/git/cmd.py”, line 825, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(128)
cmdline: git push -u origin master
stderr: ‘fatal: could not read Username for ‘https://gitlab.pavlovia.org’: Device not configured’

On gitlab. pavlovia .org , the name of the experiment appears with some command line instructions (git global setup, create a new repository, etc), but with none of my files I tried to upload, and the experiment is on pavlovia.org/explore but unactivated, of course.

Any help would be greatly appreciated!


#16

I have the exact same issue as @tjmccormick5!! Is there any alternative way to push the files? I’m new to code in the commend line, so any suggestion would be greatly appreciated.


#17

Just to give you some feedback that I am still working on this… but the problem turns out to be really hard!!

I believe the first issues with the ‘fingerprint’ and the ‘origin already exists’ are now handled better by PsychoPy in the way it creates user keys and projects on pavlovia. The one I’m stuck on is the final one about fatal: could not read Username for 'https://gitlab.pavlovia.org': Device not configured

Some of the gritty details:

  1. path mismatch On mac the app seems to have a different path environment to your terminal and git is either at /usr/local/bin/git (installed by scm git but not found on the Standalone app path, grrr) or at /usr/bin/git (the apple one, which is found but not your default in terminal) so the reason that you get different results in terminal and in the app might be due to different git instances
  2. Having to give a password On mac it seems that even though we’ve installed a pair of SSH keys now, and told it where to find them, a mac will still ask you to type in your password first time. As you found out on the terminal, it isn’t even clear what the password is that we need for that (possibly a Personal Access Key instead of normal password but that isn’t clear from the gitlab docs)
  3. use HTTPS to log in instead?. Then we can’t use SSH keys to bypass the passwords, and I haven’t yet worked out a way to provide the password without going through the Terminal, but it does at least provide us the chance to type in a password that we know! So, as a last resort this might be as good as we can do (but we’ll still need to fix Problem 1 either way or we’ll have the problem that one git knows the password but not necessarily the one we’re using)

If anyone knowledgable about git/SSH on mac has ideas that would be great! But suffice to say I am still working on this. [sigh]


#18

thanks for the update, Jon.


#19

Hello all,

I have had the same issue and was able to push my files onto gitlab.pavlovia.org using the following instructions provided when you create a new project on the website.

Existing folder
`cd <existing_folder>
#this must be the path to the folder your .psyexp file is stored in so that its used as #the current directory (cd)

git init

git remote add origin git@gitlab.pavlovia.org:Dalvare5/test.git

git add .

git commit -m “Initial commit”

git push -u origin master`

After doing this I was able to find my project on Pavlovia.com, activate it by clicking on the button, and it ran! However, now I am dealing with separate syntax errors since the code used for an online experiment may not be in python, i think.

I hope this helps @ Danlei_Chen & @ tjmccormick5!


#20

The online code is definitely not python. It has to be JavaScript because Python doesn’t run in a browser


#21

Hi Felix,

Did the initial error occur the first time you tried to push files to gitlab?

I ask because I was having very similar issues after trying to push commits to a project that I had already created. My mistake was that I had multiple accounts made on gitlab and my username and password were set to the wrong account. I was getting errors like this:

cmdline: git push -u origin master
stderr: ‘remote: HTTP Basic: Access denied
fatal: Authentication failed for ‘https://gitlab.pavlovia.org/unagi_pie/new-ldt.git/ ’’

I was able to fix this by going to the windows ‘credential manager’ in the control panel. If you go there, you should be able to check the state of your username and password for gitlab.pavlovia.org. That might provide some useful info.