psychopy.org | Reference | Downloads | Github

Project isn't syncing to pavlovia


#1

Just created a single test trial of an experiment in Psychopy3 and trying to upload it to pavlovia. My laptop won’t seem to get past this stage and I’m not sure what I’m doing wrong. I’ve created a project in Pavlovia to upload it to and am following the instructions from http://www.psychopy.org/online/fromBuilder.html. I also have created and linked an ssh key to my account although honestly I have no idea what any of this means.


#2

Hi @steph_dx1,

I’ve had the same problems syncing to pavlovia. When I try to sync a consistently get a message saying that this file doesn’t belong to any project.

So, the way to get around this is to send the files manually using command prompts. I’m currently working on a list of instructions on how to do this for others in my lab. When it’s done I can send it to you. Hopefully that will work


#3

thank you!


#4

Start by opening command prompt (search your computer for ‘cmd’ and you should find it). Once you open cmd, you have to navigate to the folder where all of your files are. You have to type 'cd ’ and then the directory. So, for example: cd desktop\experiment 1. Once you are in the folder you should be able to see that in the cmd line.

e.g.
C:\Users\jorda\Desktop\Experiment 1>

Now you can start pushing things to pavlovia manually.

|a)| type ‘git status’ (check to see if files have changed, only looks at local directory)
|b)| type ‘git add -A’ (add changes to staging area, ready to send online)|
|c)| type ‘git commit -m “(insert message here)”’ (commit the changes and add a message detailing the contents of the commit)|
|d)| type ‘git pull’ (you will have to make sure that the any new files (primarily data output files), in the online repository are first added to your local repository, otherwise git will be angry)|
|e)| type ‘git push’ (actually send the commits online)|
|f)| type ‘git log’ (check the log of commits to make sure it worked, press q to exit if necessary)|
|g)| type ‘git status’ (double check to make sure staging area is clear and no further updates are necessary)

Hopefully that will work.
Let me know if you’re still having trouble.


No such file or directory error message by Pavlovia
#5

I have the same issue that it always seems to stick on “Synchronising…”.

i have attempted your command prompt code to push the files but I get an error “fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.”

This is my first attempt at using PsychoPy online so I may have missed something?


#6

HI @b-kennedy0, which version of Psychopy are you using, and have you logged in to your account on Pavlovia?


#7

Hi

I’m using v3.0.0b11

I have signed into my Pavlovia account through PsychoPy. However, clicking back into the Menu bar ‘Pavlovia.org<User’ it still shows the option to log in and nothing else. Is that normal? (attached screenshot)Capture


#8

I do not think that is normal. The menu should display your username above “Log in to Pavlovia…”. So, when you click on the icon, it shows you are logged in? When you go to the website and log in, does that work? Also, are you using a Mac or Windows PC?


#9

Thanks for such speedy responses!!

When I click the Log in option, it shows this:

I am able to log in to the Pavlovia website with no issues. I am using Windows PC (windows 10)


#10

I ended up having the same issue repeatedly where it wouldn’t recognise me being logged in. I gave up in the end and used a different software to create experiments!


#11

@b-kennedy0, thank you for patience. This software is still in beta stages and so you can expect bugs will occur, but we will fix them.

I think @jon may know what is going on here?


#12

@dvbridges That’s really interesting. So, my username is supposed to appear above the ‘log into pavlovia’ text on that tab. Having noticed that, I noticed an error that occurred after I logged in that might be causing this issue.

I get the following error message in the coder output after logging in:

Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\menu.py", line 111, in onLogInPavlovia
    logInPavlovia(parent=self.parent)
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\functions.py", line 65, in logInPavlovia
    pavlovia.login(token, rememberMe=True)  # log in to the current pavlovia session
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 102, in login
    user = User(gitlabData=currentSession.user, rememberMe=rememberMe)
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py", line 159, in __init__
    comment=gitlabData.email)
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\projects\sshkeys.py", line 46, in saveKeyPair
    '-P', ''])
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 403, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 971, in _execute_child
    args = list2cmdline(args)
  File "C:\Program Files (x86)\PsychoPy3\lib\subprocess.py", line 461, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: a bytes-like object is required, not 'str'  

This now feels like a fixable problem, but I’m not sure how to proceed.
Any ideas?


#13

Thanks, yes, I think we might be able to fix that one by making sure that the values being sent to the command to create the SSH keys are sent as ascii (bytes) not as unicode. Thanks for working out why it was going wrong on some installs. Very helpful.

Actually though, I also had 2 breakthroughs last week that might make the sync system much more robust and hopefully mean we won’t need SSH keys (or a git installation) at all:

  • I’ve been testing the use of a pure-Python alternative to git (but fully compatible with it) that means we can package it up as part of PsychoPy Standalone
  • On top of that I’ve found a way that I think we can push changes to the repo using the same authorisation method as we’re using on the web page (https+oauth2) instead of using ssh and that should mean not needing to create keys

I’ll do my best to get this tested for sure in the next couple of days and see if we can settle this problem once and for all!

thanks again all for your patience (and helpful info)


#14

This sounds great, Thank you so much for working on this! - I can’t wait to be able to get some PsychoPy studies online to Pavlovia.

Would it be best to watch the Announcements tab or the Online experiments one for any updates? @jon


#15

Just to note that I had this failed synchronisation issue too, and I also solved it by manually pushing my files, using the instructions which appear on the repo page if you visit before any files are there. I reproduce them here:

cd existing_folder
git init
git remote add origin https://gitlab.pavlovia.org/yourusername/yourprojectname.git
git add .
git commit -m "Initial commit"
git push -u origin master

n.b. i had git installed already on my machine