shot_profiles states action parameter throws an exception

22 views
Skip to first unread message

driskel

unread,
May 31, 2018, 5:50:17 PM5/31/18
to MPF Users
When trying to set the action parameter on a shot_profile states entry an exception is thrown.


Here is the relevant configuration, simplified for reproduction.

#config_version=5

hardware
:
    platform
: p3_roc
    driverboards
: pdb
   
displays
:
    window
:
        width
: 800
        height
: 600

window
:
    width
: 800
    height
: 600
    title
: Prototype

shot_profiles
:
    flash
:
        states
:
           
- name: unlit
              show
: "off"
              action
: stop

Here is the log entry

2018-05-31 16:48:56,244 : INFO : Machine : Mission Pinball Framework Core Engine v0.50.10
2018-05-31 16:48:56,245 : INFO : Machine : Command line arguments: {'create_config_cache': True, 'loglevel': 15, 'syslog_address': None, 'force_platform': 'virtual', 'consoleloglevel': 20, 'force_assets_load': False, 'pause': False, 'bcp': True, 'text_ui': True, 'production': False, 'mc_file_name': None, 'logfile': 'logs/2018-05-31-16-48-56-mpf-MacBook-Pro.HDA.log', 'mpfconfigfile': '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml', 'no_load_cache': False, 'configfile': ['config.yaml']}
2018-05-31 16:48:56,245 : INFO : Machine : MPF path: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf
2018-05-31 16:48:56,245 : INFO : Machine : Machine path: /Users/mr/pinball/mr-mpf-machines/machines/simple_configs/lights/shot_light_show
2018-05-31 16:48:56,245 : INFO : Machine : Platform: darwin
2018-05-31 16:48:56,245 : INFO : Machine : Python executable location: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3
2018-05-31 16:48:56,245 : INFO : Machine : Python version: 3.5.2 (64-bit)
2018-05-31 16:48:56,513 : INFO : Machine : Machine config file #1: config.yaml
2018-05-31 16:48:56,515 : WARNING : ConfigProcessor : Config file in cache changed: /Users/mr/pinball/mr-mpf-machines/machines/simple_configs/lights/shot_light_show/config/config.yaml
2018-05-31 16:48:56,516 : INFO : ConfigProcessor : Loading config from file /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml.
2018-05-31 16:48:56,569 : INFO : ConfigProcessor : Loading config: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/mpfconfig.yaml
2018-05-31 16:48:56,570 : INFO : ConfigProcessor : Loading config from file /Users/mr/pinball/mr-mpf-machines/machines/simple_configs/lights/shot_light_show/config/config.yaml.
2018-05-31 16:48:56,573 : INFO : ConfigProcessor : Loading config: /Users/mr/pinball/mr-mpf-machines/machines/simple_configs/lights/shot_light_show/config/config.yaml
2018-05-31 16:48:56,574 : INFO : ConfigProcessor : Config file cache created: /var/folders/5p/8kcfqh4s4f3776sdbb4_217h0000gn/T/1b95118193f584dcd8568dd452946547.mpf_cache
2018-05-31 16:48:56,575 : INFO : Machine : Initialise MPF.
2018-05-31 16:48:56,761 : INFO : ConfigProcessor : Loading config from cache: /var/folders/5p/8kcfqh4s4f3776sdbb4_217h0000gn/T/26c63ec3c72d75f0dc9394afbd625513.mpf_cache
2018-05-31 16:48:56,765 : INFO : ConfigProcessor : Loading config from cache: /var/folders/5p/8kcfqh4s4f3776sdbb4_217h0000gn/T/f95870f3667a37a74e38324a4aade001.mpf_cache
2018-05-31 16:48:56,768 : ERROR : ConfigValidator : Your config contains a value for the setting "shot_profiles:states:[list_item]:states:action", but this is not a valid setting name.
2018-05-31 16:48:56,769 : ERROR : asyncio : Exception in callback EventManager._done(<Task finishe...ting name.',)>)
handle: <Handle EventManager._done(<Task finishe...ting name.'
,)>)>
Traceback (most recent call last):
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/events.py", line 125, in _run
   
self._callback(*self._args)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py", line 686, in _done
    future
.result()
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
   
raise self._exception
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result
= coro.send(None)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/events.py", line 614, in _run_handlers_sequential
    handler
.callback(queue=queue, **merged_kwargs)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device_manager.py", line 110, in _load_device_modules
   
self.load_devices_config(validate=True)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device_manager.py", line 174, in load_devices_config
    config
[device_name] = collection[device_name].validate_and_parse_config(config[device_name], False)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/device.py", line 101, in validate_and_parse_config
   
self.config_section, config, self.name, "device", prefix=debug_prefix)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/config_validator.py", line 162, in validate_config
    section_name
=k))
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/config_validator.py", line 139, in validate_config
    validation_failure_info
)
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/config_validator.py", line 296, in check_for_invalid_sections
   
'setting name.', 2, self.log.name)
mpf
.exceptions.ConfigFileError.ConfigFileError: Config File Error in ConfigValidator: Your config contains a value for the setting "shot_profiles:states:[list_item]:states:action", but this is not a valid setting name. Error Code: CFE-ConfigValidator-2
2018-05-31 16:48:56,884 : ERROR : root : Exception is not set.
Traceback (most recent call last):
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/commands/game.py", line 208, in __init__
   
MachineController(mpf_path, machine_path, vars(self.args)).run()
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 661, in run
   
self.initialise_mpf()
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mpf/core/machine.py", line 653, in initialise_mpf
   
if init.exception():
 
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 288, in exception
   
raise InvalidStateError('Exception is not set.')
asyncio
.futures.InvalidStateError: Exception is not set.


jabdoa

unread,
Jun 1, 2018, 4:06:35 AM6/1/18
to MPF Users
I don't think the action parameter is valid in shot_profiles. Will fix the documentation.

Jan

driskel

unread,
Jun 1, 2018, 7:08:06 AM6/1/18
to MPF Users
Thank you.  I ran into it working on shots and thought I would give you a heads up.

jabdoa

unread,
Jun 1, 2018, 8:25:20 AM6/1/18
to MPF Users
Thanks. Removed it from the docs (dev only so far).

Jan
Reply all
Reply to author
Forward
0 new messages