Skip to content

Reading MPF Errors

MPF errors might be chained. This means that a more general error is caused by a more specific one. In general, you need to read those error from the bottom to the top. On the bottom there will be the most general error and all errors above will be more specific.

For instance a Switch might be unable to initialize because your hardware platform cannot connect to the relevant node board:

INFO : EventManager : Event: ======'shutdown'====== Args={}
Shutdown because of an exception:
ERROR : Machine : Runtime Exception
Traceback (most recent call last):
  File "/mpf/mpf/devices/switch.py", line 135, in _initialize
    self.config['number'], config, self.config['platform_settings'])
  File "/mpf/mpf/platforms/virtual.py", line 94, in configure_switch
    raise AssertionError("Cannot find board for switch {}".format(number))
AssertionError: Cannot find board for switch 0-7

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mpf/mpf/core/machine.py", line 741, in _run_loop
    raise self._exception['exception']
  File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
  File "/mpf/mpf/core/events.py", line 114, in _async_handler_done
    future.result()
  File "/mpf/mpf/core/device_manager.py", line 103, in _load_device_modules
    await self.initialize_devices()
  File "/mpf/mpf/core/device_manager.py", line 199, in initialize_devices
    await collection[device_name].device_added_system_wide()
  File "/mpf/mpf/core/system_wide_device.py", line 15, in device_added_system_wide
    await self._initialize()
  File "/mpf/mpf/devices/switch.py", line 137, in _initialize
    raise AssertionError("Failed to configure switch {} in platform. See error above".format(self.name)) from e
AssertionError: Failed to configure switch s_door_back in platform. See error above

So in this case the door switch could not be configured because the node board was missing at the hardware.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results