Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with PsychoPy 1.90.1 (Python 2 edition - Windows 10) #1821

Closed
6 of 8 tasks
frankgasking opened this issue May 10, 2018 · 7 comments
Closed
6 of 8 tasks

Issues with PsychoPy 1.90.1 (Python 2 edition - Windows 10) #1821

frankgasking opened this issue May 10, 2018 · 7 comments
Assignees
Labels
💻 app/ui PsychoPy app changes (often wxPython issues) 🐞 bug Issue describes a bug (crash or error) or undefined behavior. ⏰ waiting for feedback

Comments

@frankgasking
Copy link
Contributor

frankgasking commented May 10, 2018

Hi there,

We recently tested out 1.90.1 (Python 2 edition) with a number of our scripts, and found a number of issues.

This was using a Dell Optiplex 7050 (http://www.dell.com/en-uk/work/shop/desktop-and-all-in-one-pcs/optiplex-7050-tower-small-form-factor/spd/optiplex-7050-desktop) with Windows 10 installation.

Here are the issues spotted:

  • 1) Hex colour encoding not working correctly. Seems to create a speckled effect when used for a background colour. My colleague has reported also at https://discourse.psychopy.org/t/hexadecimal-color-strings-not-working/4471

  • 2) There is a "Unknown stereo type -1" error when using Sound class in Coder and using the "Sounddevice" codebase. Workaround is to have to set "stereo=True" on a sound() call, though documentation doesn't seem to mention that you have to include this.

  • 3) On the initial run, PsychoPy tries to download ffmpeg. This fails. When manually trying to kick off again, you see an error reporting why:
    "Error while fetching file: <urlopen error [SSL:CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c.590)>" Internet connection is confirmed as fine, and the same issue occured on another test machine.

  • 4) When using a sound component, when pulling duration from an Excel file, it causes the following error: "Could not convert string to float: VARIABLE NAME" Seems like the autoconversion from Excel is broken, specficially at \psychopy\experiments\components\sound_init_.py line 65 in writeInitCode.

  • 5) If playing audio files with different encodings, it fails when using "sounddevice" with a "psychopy.exceptions.SoundFormatError: Tried to create audio stream 48000_1_128 but 44100_1_128 already exists and win32 doesn't support multiple portaudio streams" error

  • 6) PYO sound was broken on the Dell Optiplex 7050 (at least). Segmentation fault on desktop PC, "Server must be booted" error. A sound driver update initially worked, but then the issue would still occur on other scripts - due to initialization of the portaudio server I think?

  • 7) Moviestim2 demo does not work. Complains about VLC module not being present, even though VLC has been installed/reinstalled. This actually affects using OpenCV though as a movie playback type.

  • 8) Moviepy playback option works and plays an Mp4 video once, slightly out of sync - doesn't allow playback of a second video and crashes out without any kind of error message when it tries to.

Let me know if you need any more details.

Best wishes,

Frank

@hoechenberger hoechenberger added library 🐞 bug Issue describes a bug (crash or error) or undefined behavior. labels May 29, 2018
@hsogo
Copy link
Contributor

hsogo commented Jun 13, 2018

Issue 7)

I confirmed that vlc module is not properly installed in Standalone PsychoPy 1.90.1 and 1.90.2 for Windows.

In these versions, vlc.py is in psychopy/visual directory. This module was importable from psychopy/visual/movie2.py in the previous version of PsychoPy, but it cannot be imported in the current version due to use of absolute_import.

In python3 version of Standalone PsychoPy 1.90.1 for Windows, vlc module is properly installed.

In addition to installation of vlc module problem, version of VLC media player may cause trouble. Because Standalone PsychoPy for Windows uses 32bit python, 32bit version of VLC media player must be installed.

peircej added a commit that referenced this issue Jun 18, 2018
BF: Adds hex color specification for window. Fixes 1) in #1821.
@peircej
Copy link
Member

peircej commented Jun 19, 2018

I think:

  1. is due to an old version of Python2.7 being in the last release. I've updated to Python 2.7.15 for the next release which I believe contains newer SSL certificates
  2. I think this is a "won't fix". Users need to get all their sounds into the same sample rate. On Windows portaudio doesn't allow multiple sound streams with different rates, so to allow different sampling rates would require us to resample the sounds while playing them, which would be less efficient.
  3. I've confirmed that the vlc lib is installed and working for both py2 and py3. The issue of requiring 32bit vlc seems necessary unless we can provide 64/32bit options of Python (I don't know if it's worth the confusion of adding another release type)

Not sure what to do about (6). And (8) still needs exploring

@dvbridges
Copy link
Contributor

I was just looking at solutions to 5) and was going to suggest an option to resample using samplerate which is a wrapper around the Secret Rabbit Code - a lib for high-quality sample rate conversion.

peircej added a commit that referenced this issue Jun 20, 2018
BF: Allows sound duration defined from cond. file. Fixes 4) from #1821
@liffiton
Copy link

liffiton commented Jul 9, 2018

I ran into the same issue with how movie2 imports vlc in 1.90.3. My script, using movie2, would crash with the error:

ImportError: No module named vlc

A quick fix was to change movie2.py:110 to from psychopy.visual import vlc. That fixed it for me.

@liffiton
Copy link

Sorry, I should also point out that this was with 32-bit PsychoPy 1.90.3 under Windows.

@TEParsons
Copy link
Contributor

TEParsons commented Aug 5, 2021

Given the stuff @mdcutone has been doing recently I'd wager 5 is no longer relevant as audio is totally different behind the scenes now, and movie stim is next up for these changes so 8 may well be fixed soon too. Matthew can you confirm?

@peircej peircej removed the library label Aug 12, 2021
@TEParsons TEParsons added the 💻 app/ui PsychoPy app changes (often wxPython issues) label Aug 13, 2021
@mdcutone
Copy link
Member

Many of these issues were resolved by the inclusion of the PTB audio backend. Movie playback improvements are ongoing but vastly improved at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 app/ui PsychoPy app changes (often wxPython issues) 🐞 bug Issue describes a bug (crash or error) or undefined behavior. ⏰ waiting for feedback
Projects
None yet
Development

No branches or pull requests

8 participants