Crash on MPF startup Cobrapin OPP

63 views
Skip to first unread message

Marty McFly

unread,
Sep 16, 2021, 1:41:30 PM9/16/21
to MPF Users
Crash log below. I sent it after it happened. Trying to figure out why I cannot start up mpf -b with a basic cobrapin config.

Traceback (most recent call last):
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 673, in initialise_mpf
    raise init.exception()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 244, in initialise
    await self.initialise_core_and_hardware()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 230, in initialise_core_and_hardware
    self._load_hardware_platforms()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 473, in _load_hardware_platforms
    self.add_platform(hardware_platform)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 607, in add_platform
    self.hardware_platforms[name] = hardware_platform(self)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\platforms\opp\opp.py", line 76, in __init__
    self.config = self.machine.config_validator.validate_config("opp", self.machine.config['opp'])
KeyError: 'opp'

Anthony van Winkle

unread,
Sep 16, 2021, 1:44:47 PM9/16/21
to MPF Users
It looks like your machine is looking for an opp: section in your main config file, and can't find it.

Marty McFly

unread,
Sep 16, 2021, 4:00:13 PM9/16/21
to MPF Users
You know what. I tried taking some things out of the main cobrapin config file to see if I could narrow it down. If I use the starter config for cobrapin on MPF site, I still get a crash. It appears that it might be an error opening up the USB port?

Shutting down...
Event: ======'shutdown'====== Args={}
Failed to initialise MPF
Traceback (most recent call last):
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 673, in initialise_mpf
    raise init.exception()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 244, in initialise
    await self.initialise_core_and_hardware()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 240, in initialise_core_and_hardware
    await self._initialize_platforms()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\machine.py", line 331, in _initialize_platforms
    result.result()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\platforms\opp\opp.py", line 105, in initialize
    await self._connect_to_hardware()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\platforms\opp\opp.py", line 278, in _connect_to_hardware
    await comm.connect()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\platforms\base_serial_communicator.py", line 45, in connect
    await self._connect_to_hardware(self.port, self.baud, self.xonxoff)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\platforms\base_serial_communicator.py", line 54, in _connect_to_hardware
    self.reader, self.writer = await connector
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\mpf\core\clock.py", line 155, in open_serial_connection
    **kwargs)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\asyncio\coroutines.py", line 120, in coro
    res = func(*args, **kw)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\serial_asyncio\__init__.py", line 410, in create_serial_connection
    ser = serial.serial_for_url(*args, **kwargs)
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
    instance.open()
  File "c:\users\billp\appdata\local\programs\python\python37\lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/dev/ttyACM0': FileNotFoundError(2, 'The system cannot find the path specified.', None, 3)


Marty McFly

unread,
Sep 16, 2021, 4:11:32 PM9/16/21
to MPF Users
I just realized when I plug them in I have to define them based on what my computer labels them. So COM3, COM4, and COM5 (for the satellite board)

jabdoa

unread,
Sep 17, 2021, 6:30:38 AM9/17/21
to MPF Users
I will improve the error above as well. It should not crash out hard.

Jan
Reply all
Reply to author
Forward
0 new messages