juliencegarra / OpenMATB

OpenMATB: A Multi-Attribute Task Battery promoting task customization, software extendability and experiment replicability
Other
48 stars 35 forks source link

simpletext.py: KeyError: 'text' #45

Open mpeters2 opened 1 month ago

mpeters2 commented 1 month ago
File "/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
    exec(code, globals, locals)

  File "/OpenMATB-master/main.py", line 49, in <module>
    app = OpenMATB()

  File "/OpenMATB-master/main.py", line 46, in __init__
    Scheduler()

  File "/OpenMATB-master/core/scheduler.py", line 36, in __init__
    self.event_loop.run()

  File "/Users/MattPetersonsAccount/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/pyglet/app/base.py", line 169, in run
    timeout = self.idle()

  File "/Users/MattPetersonsAccount/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/pyglet/app/base.py", line 239, in idle
    redraw_all = self.clock.call_scheduled_functions(dt)

  File "/Users/MattPetersonsAccount/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/pyglet/clock.py", line 255, in call_scheduled_functions
    item.func(dt, *item.args, **item.kwargs)

  File "/OpenMATB-master/core/clock.py", line 31, in advance
    self.tick()

  File "/Users/MattPetersonsAccount/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/pyglet/clock.py", line 348, in tick
    self.call_scheduled_functions(delta_t)

  File "/Users/MattPetersonsAccount/opt/anaconda3/envs/PsychoPy39/lib/python3.9/site-packages/pyglet/clock.py", line 255, in call_scheduled_functions
    item.func(dt, *item.args, **item.kwargs)

  File "/OpenMATB-master/core/scheduler.py", line 73, in update
    self.update_active_plugins()

  File "/OpenMATB-master/core/scheduler.py", line 89, in update_active_plugins
    [p.update(self.scenario_time) for p in self.get_active_plugins()]

  File "/OpenMATB-master/core/scheduler.py", line 89, in <listcomp>
    [p.update(self.scenario_time) for p in self.get_active_plugins()]

  File "/OpenMATB-master/plugins/abstractplugin.py", line 60, in update
    self.refresh_widgets()

  File "/OpenMATB-master/plugins/sysmon.py", line 183, in refresh_widgets
    if not super().refresh_widgets():

  File "/OpenMATB-master/plugins/abstractplugin.py", line 243, in refresh_widgets
    self.get_widget('task_title').set_text(self.parameters['title'].upper())

  File "/OpenMATB-master/core/widgets/simpletext.py", line 29, in set_text
    if text == self.get_text():

  File "/OpenMATB-master/core/widgets/simpletext.py", line 36, in get_text
    return self.vertex['text'].text

KeyError: 'text'

This happens after pressing the spacebar on the "Presentation de taches" screen (I have the .ini file set to Engish, but I'm getting a mixture of English and French).

MacOS 14.6.9, Python 3.9

benoitvalery commented 2 days ago

Hi @mpeters2, can you please precise which version you are using, or which commit. Thanks.