crashing trying to use end_bonus_event

21 views
Skip to first unread message

Ryan McQuaid

unread,
Feb 17, 2020, 9:27:14 PM2/17/20
to MPF Users
setting up end of ball bonus using the built in system, everything works except im trying to add a delay that waits 3 seconds after the final bonus is posted. I'm using a simple timer.

mode_settings:
   display_delay_ms
: 800
   hurry_up_delay_ms
: 100
   hurry_up_event
: flipper_cancel
   end_bonus_event
: timer_bonus_end_delay_complete
   bonus_entries
:
     blah blah blah

timers
:
  bonus_end_delay
:
    start_value
: 3
    end_value
: 0
    direction
: down
    tick_interval
: 1s
    start_running
: false
    restart_on_complete
: false
    control_events
:
     
- action: start
       
event: bonus_total

having end_bonus_event in the settings crashes as soon as ball is drained regardless of what event is placed there.

2020-02-17 21:11:32,336 : Mode.bonus : Mode Start. Priority: 500
2020-02-17 21:11:32,333 : ERROR : asyncio : Exception in callback EventManager.process_event_queue()
handle
: <Handle EventManager.process_event_queue()>
Traceback (most recent call last):
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\asyncio\events.py", line 145, in _run
   
self._callback(*self._args)
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\site-packages\mpf\core\events.py", line 756, in process_event_queue
    callback
(**kwargs)
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\site-packages\mpf\core\mode.py", line 251, in _mode_started_callback
   
self.mode_start(**self.start_event_kwargs)
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\site-packages\mpf\modes\bonus\code\bonus.py", line 59, in mode_start
   
self._end_bonus)
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\site-packages\mpf\core\mode.py", line 549, in add_mode_event_handler
    key
= self.machine.events.add_handler(event, handler, self.priority + priority, mode=self, **kwargs)
 
File "c:\users\mcsquid\appdata\local\programs\python\python36\lib\site-packages\mpf\core\events.py", line 146, in add_handler
    handler
, event, sig))
AssertionError: Handler <bound method Bonus._end_bonus of <Mode.bonus>> for event 'timer_bonus_end_delay_complete' is missing **kwargs. Actual signature: ()



jabdoa

unread,
Feb 18, 2020, 5:13:56 PM2/18/20
to MPF Users
Looks bonus mode related. I will have a look.

Jan

Ryan McQuaid

unread,
Feb 27, 2020, 2:07:02 PM2/27/20
to MPF Users
Thanks

jabdoa

unread,
Feb 29, 2020, 6:38:58 AM2/29/20
to MPF Users
Just fixed this in dev. We also lacked a test. It is now tested and should not break again.

Jan
Reply all
Reply to author
Forward
0 new messages