I have an anaconda PsychoPy3 installation with psychopy 1.90.2 and python 3.5 on MacOS High Sierra. The only additional packages I installed are pylink and h5py.
When I try to present a dialogue box from dictionary, e.g.:
dlg = gui.DlgFromDict({‘One Item’: False,
‘Two Items’: True})
the command just hangs and it never returns. The dialogue is not presented on the screen at all.
Has anyone had similar experience? Any ideas what could cause this error? I do not get any errors, the code just hangs until I terminate it.
Hi @dvbridges and thanks for the suggestion. While your snippet works well, the issue does not seem to be related to the character encoding.
Rather, the issue seems to have to do with how different packages in psychopy interact. Only when I import visual and/or event packages from psychopy, the dlg.DlgFromDict() does not return.
This works:
import core (and/or import monitors, tools, logging)
import gui
gui.DlgFromDict()
This does not work:
import visual (and/or import event)
import gui
gui.DlgFromDict()
My guess is that this is a problem with wxpython clashing with pyglet (which is used for events and visual stimuli).
psychopy.gui will try to use PyQt if available (because that doesn’t normally have this issue). If PyQt isn’t available then it will use wx instead. So if you install PyQt (or just use standalone) I think it will be fine