OS Win10
PsychoPy version Psychopy 3
Standard Standalone? (y/n) No. Running on an Anaconda3 python installation.
Hi, everyone,
I am having a problem with a script that was previously running without issues. The scripts starts, runs up to the point where the window is shown, then stops without issuing any error message. I have tried to locate the problem by removing components in a somewhat haphazard way and found out that the crash occurred in “vk.pyo_init” (by commenting this line). However, without an error message I am lost as to what may be causing the issue.
We did not change the code in any way. As far as I know, the only change that was done to the computer was that it was plugged to the internet cable. I checked for updates in Windows, and there was one security intelligence update to Windows Defender Antivirus. I tried disabling Windows Defender completely using the registry, but this did not work.
Does someone have any hint as to what the problem could be?
Here is the section where I use “vk.pyo_init”:
from psychopy import visual, core, event, sound, gui
import psychopy.voicekey as vk
import datetime
import random
import os
# Start time
now = datetime.datetime.now()
###===========================================================================================###
###=================================== Screen parameters =====================================###
###===========================================================================================###
FullScreen = True # True if fullscreen, False if not
Screen = 0
### Monitor settings
Monitor = 's19E310'
if Monitor == 's19E310':
screenRes = (1366,768)
screenX = 40.98
screenY = 23.04
pixCm = 33.33
cmDeg = 1.74 # centimeters in one visual degree
pixDeg = pixCm *cmDeg #distance of 100cm;
frameRate = 60
frameLength = 1.0/frameRate
#================================================================================================================#
#============================================ Experiment information ============================================#
#================================================================================================================#
expName = "hrv_task"
expInfo = {'Participant number': '', 'Participant initials': ''}
gui.DlgFromDict(dictionary=expInfo, title=expName)
subjectId = int(expInfo['Participant number'])
subjectInitials = expInfo['Participant initials']
respKeys = ['j', 'k'] # j for correct, k for incorrect
#Setup window
win = visual.Window(screenRes, color="white", units='pix', allowGUI=False, fullscr=FullScreen, screen = Screen, monitor = Monitor)
#========================================== Setup microphone =========================================#
vk.pyo_init(rate = 44100, buffersize = 32)