psychopy.org | Reference | Downloads | Github

PsychoPy 1.85.0 issues

code
sound
screen

#1

Hi there,

I’ve just been testing the new 1.85.0RC today and have found a number of issues which I thought i’d share below. First two I have submitted patches for. This was tested on a Windows 8 PC.

Please let me know if you prefer to have these individually posted. I didn’t want to spam the forum.

1) Missing “import sys” in “sound/backend_pyo.py” (Patch submitted)
- Any sound playback will crash, sys undefined error

2) “default” is checked as “auto” in “sound/init.py” on line 138 (Patch submitted)
- Causes an error in the logs about not having a speaker called “default”

3) Pygame library is completely missing in Windows install (not tested Mac/Linux versions)
- Means that Pygame display and sound options cannot be used currently.

4) Using Pyo for sound has a glitchy sound noise when quitting, and the following error:
“portaudio error in Pa_AbortStream:Unanticipated Host Error”
“Exception TypeError: “‘NoneType’ object is not callable” in <bound method Server._del_of<pyolib.server.Server object at 0x17801030>> ignored”

5) New ‘sounddevice’ sound library occasionally skips playing a sound when trying to play multiple sounds (playing new sounds when one is already playing).

6) MovieStim.py demo does not run at all with ‘sounddevice’ library. The other demo Movie scripts work perfectly fine though.
- No error given on MovieStim.py, just closes right away with no video shown.

7) When using ‘sounddevice’, i’ve seen “IOError: Unknown Stereo type -1” errors for some coder scripts
- Have had to add “stereo=True” as an extra parameter on the Sound object when calling the file to load in to fix it.

EDIT - Feedback on the online functionality (click below to reveal):

Summary

Nice to haves

1) Would be good to have the option of passing startup attributes over GET, instead of sometimes having the pop up window. Its something that can be worked around though with a bit of code, so not critical.

2) Would be good to have redirection options at the end - the ability to redirect to another URL, possibly with parameters embedded to pass onto another system (such as Qualtrics). Again, its something that a bit of code can be added for now.

3) Inquisit can force full screen for users when running. It would be good to have something similar, as users can rescale the browser window if they wished.

Bugs

These were based on the Builder Stroop demo, with a simple Image added to the page as a distractor (so I could test the image resource upload):

1) Image stimuli works and displays images, though has issues loading the last resource on the CSV trials list. It doesn’t seem to set up the last image resource correctly, and says that the object property is not present in the resources object. It moves to the next last item if you remove items from the end and try again, so it isn’t a path issue.

2) When using images, the data file output does not include the image path of what was shown and specified from the trials list.

3) When using images, it tries to set a unit setting as “from exp settings”, which is not a valid unit and crashes the script out. Commenting out this line in index.html resolves the error.

4) Running over HTTPS (which our webfarm enforces) gives mixed content issue, as js/psychojs/main.js tries to call a http url for IP fetching.

5) In the generated info.php - ExperimenterEmail has an unclosed property, which causes the script to crash on load. Needs to be set to a blank string by default.

6) In the generated JS instruction routines, it tries to access properties of ‘TrialComponent’, when it should be ‘instructComponent’ that it tries to access.

7) JS code generated puts a bunch of “flowScheduler.add(quitPsychoJS)” calls in experiment flow - so after seeing the instruction screen, the experiment would end without running trials. Can easily be removed to get things running.

Best wishes,

Frank


Sounddevice backend issue?
Passing startup parameters
#2

Thanks for the info Frank. I’ll get on to these (and I see you’ve fixed a couple on github already)


#3

No problem Jon.

Following on, i’ve also been testing out the online functionality today - which is looking great so far. We are looking to move away from Inquisit for online experiments, so the new functionality is ideal timing.

I have added some suggestions and a few bugs I found into the main post above (as its related to the same build report). Hope this is ok - if you want it posting separate, please let me know.

Cheers,

Frank


#4

OK, many of these are confirmed fixed for the next bug-fix release. So point by point:

##app bugs:

  1. fixed (thanks)
  2. fixed (thanks)
  3. fixed - I’ve made sure this is on the dev machine that I build from. I’ve had to upgrade that to pygame 1.9.3 because 1.9.2 wouldn’t install. Hope they haven’t changed anything incompatible!
  4. The second error (NoneType not callable) isn’t important. I’m not sure about the unanticipated host error. (Not highly motivated to fix pyo issues right now)
  5. I’ll need to be able to reproduce this before I can work on it
  6. Fixed I think.
  7. If you can make this reproducible with a specific script/sound file then I can fix it. The problem will be to do with the issue of a sound being mono/stereo and trying to configure the right number of channels depending on what other sounds have already been played

Online Nice-to-haves:

For now (until we can get some further funding) adding further features to PsychoJS isn’t going to happen. For the future, 2) and 3) are planned. 1) seems possible but we might need to chat with you about how to implement it in a way you’d like. I’d suggest moving this discussion to the Online categro of the forum though since it isn’t about this release version per se

Online Bugs

Thanks for these. The first two need more inspection. I’ll keep updating them as I (and/or Ilixa) get to them:

  1. I can’t recreate this problem (although it looks like setting the trialhandler to have multiple repeats doesn’t achieve anything). Maybe I’ve unwittingly fixed it with one of the other fixes.
  2. Inserting condition info: Needs fixing in JS lib
    2b. trials are also not being randomised properly: Needs fixing in JS lib
  3. Fixed in repository (that line is actually no longer needed anyway) commit fbb4444
  4. I think we can simply change that to be https:// in main.js but I don’t know if this issue will crop up in any other places. I’ve added this change in the repository
  5. Fixed commit dcf62ad
  6. Fixed (assuming this is just in the endRoutine section) commit f2c2ffa
  7. Fixed (that line should appear just once at the end of the flow) commit c8caaf

#5

I’ve made a number of fixes here You can find them by downloading the code at
https://github.com/psychopy/psychopy/tree/r1.85

A couple of the issues (and an extra I found) need fixing by Ilixa instead. Will let you know as and when those are sorted

thanks,
Jon


#6

Thanks Jon!

I’ve spent some time this afternoon having a further look, and just to feedback on a few things below. I will also separately email you some sample scripts demonstrating the errors I found.

That’s fair enough regarding the nice to haves. If there is any opportunity for us to fund or even arrange some help, we’ll let you know. I’ll post separately as requested regarding the parameter passing.

EDIT - I forgot to add - but anyone creating an online script will need to ensure their trial data is in a CSV format, so that it can be read properly by PsychoJS.

Many thanks,

Frank

APP BUGS:
5) Sending a sample experiment via email.
6) Confirmed working fine now.
7) Sending a sample script with the stereo error flagging up when “sounddevice” is set.

ONLINE BUGS:

  1. Still causing an error, so also emailed is the updated Stroop with image, and the generated files I have. Also, there is a new error introduced, where there are two “for loops” appearing under trialsLoopBegin.
  2. The protocol relative “//ipinfo.io” should fetch either over http or https, depending on the main scheme that the experiment uses. That’s what i’ve fixed it to, and it works fine.