mpf mc does not start

699 views
Skip to first unread message

A Kaljunen

unread,
Sep 20, 2022, 5:56:39 AM9/20/22
to MPF Users
Hi. I am new here and need help. I have done MPF 0.56 tutorial few steps and as there stay in bottom, that "tutorial step 2, create your machine folder... WAITING FOR MEDIA CONTROLLER localhost 5050" this is coming, because it doesn´t exist and command should be as mpf -b that media won't start. Few steps later, step 5 Add a display, part 1,  Run the media controller to see how it works  with command mpf mc. I get same message  WAITING FOR MEDIA CONTROLLER localhost 5050". I can't understand, what I have missed, and how it can exist now, because few step earlier it doesn't exist. I have tried read possible reason and solution every place, and can't get it through with media controller. Command mpf -b work fine, Any suggestions..? My platform win10, python 3.9.13, MPF0.56, kivy???

Philip Dixon

unread,
Sep 20, 2022, 11:50:24 AM9/20/22
to MPF Users
if you are not running on a physical machine you also need -x

A Kaljunen

unread,
Sep 30, 2022, 2:38:11 PM9/30/22
to MPF Users
Thanks for answer, but I am still little bit confused. Now, when I have my OPP controller connected and when I type command prompt, as "mpf both", program starts and work, but still there is red notice in window, that " WAITING FOR MEDIA CONTROLLER localhost 5050".  I can´t figure out, what does it mean, even I have tried to catch to point from instructions. Does it mean, that I have nothing to pointed from code to my media controller or do I have media controller at all?

mike wiz

unread,
Sep 30, 2022, 6:48:15 PM9/30/22
to MPF Users
Check the log files in the /logs directory.  Do they have any error messages in them?

Lieven Dewispelaere

unread,
Oct 3, 2022, 1:08:11 PM10/3/22
to MPF Users
I installed MPF fresh on windows 11 home . I have the same issue as the topic starter. when i run MPF MC i get the error in kivy DLL load failed while importing sound_file
i tried with my own program and with the MC_demo
Op zaterdag 1 oktober 2022 om 00:48:15 UTC+2 schreef mike wiz:

cobra18t

unread,
Oct 4, 2022, 12:19:06 AM10/4/22
to MPF Users
Do you have logs to share?

A Kaljunen

unread,
Oct 4, 2022, 3:29:20 AM10/4/22
to MPF Users
Now, I have tried three different PC (two laptop), and same behavior every time, MC does not start. This morning, fresh win10 (desktop, i5), python 3.9.13, MPF v0.56 and here is MC LOG file, which seems to be quite same looking, what it is also with my two laptops. DLL load failed while importing sound_file..?


2022-10-04 10:00:53,847 : kivy : Factory: 189 symbols loaded
2022-10-04 10:00:54,936 : kivy : ImageLoaderFFPy: Using ffpyplayer 4.3.5
2022-10-04 10:00:54,936 : kivy : Image: Providers: img_tex, img_dds, img_sdl2, img_pil, img_ffpyplayer
2022-10-04 10:00:55,272 : kivy : VideoGstplayer: Using Gstreamer 1.18.5.0
2022-10-04 10:00:55,272 : kivy : Video: Provider: gstplayer
2022-10-04 10:00:55,513 : kivy : mpfmc.core.audio library could not be loaded. Audio features will not be available
2022-10-04 10:00:55,513 : kivy : Loading MPF-MC controller
2022-10-04 10:00:55,534 : YamlMultifileConfigLoader : Machine config file #1: config
2022-10-04 10:00:55,534 : ConfigProcessor : Loading config from file C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\mcconfig.yaml.
2022-10-04 10:00:55,569 : ConfigProcessor : Loading config: C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\mcconfig.yaml
2022-10-04 10:00:55,569 : ConfigProcessor : Loading config from file C:\pinball\your_machine\config\config.
2022-10-04 10:00:55,592 : ConfigProcessor : Loading config: C:\pinball\your_machine\config\config
2022-10-04 10:00:55,594 : ConfigProcessor : Config file cache created: C:\Users\aslak\AppData\Local\Temp\212fd243a2076d37e38ee3965d680408.mpf_cache
2022-10-04 10:00:55,594 : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\d1a7ca7de8681a6a2bb3dff017b23ec0.mpf_cache
2022-10-04 10:00:55,598 : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\316ffff2cd22eae9acf8e1247f7fc240.mpf_cache
2022-10-04 10:00:55,602 : mpfmc : Mission Pinball Framework Media Controller v0.56.0-dev34
2022-10-04 10:00:55,602 : mpfmc : Mission Pinball Framework Game Engine v0.56.0-dev33
2022-10-04 10:00:55,602 : mpfmc : Machine path: C:\pinball\your_machine
2022-10-04 10:00:55,602 : mpfmc : Starting clock at 60.0Hz
2022-10-04 10:00:55,658 : kivy : Text: Provider: sdl2
2022-10-04 10:00:55,678 : kivy : DLL load failed while importing sound_file: Määritettyä proseduuria ei löydy.
Traceback (most recent call last):
  File "C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\commands\mc.py", line 225, in __init__
    MpfMc(options=vars(args),
  File "C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\mc.py", line 151, in __init__
    create_config_collections(self, self.machine_config['mpf-mc']['config_collections'])
  File "C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\config_collection.py", line 82, in create_config_collections
    imported_module = import_module(module)
  File "C:\Users\aslak\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\config_collections\sound_loop_set.py", line 1, in <module>
    from mpfmc.core.audio.audio_exception import AudioException
  File "C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpfmc\core\audio\__init__.py", line 7, in <module>
    from mpfmc.core.audio.audio_interface import AudioInterface
  File "mpfmc/core/audio/audio_interface.pyx", line 1, in init mpfmc.core.audio.audio_interface
ImportError: DLL load failed while importing sound_file: Määritettyä proseduuria ei löydy.
2022-10-04 10:00:55,709 : kivy : Stopping child threads... (0 remaining)
2022-10-04 10:00:55,709 : kivy : All child threads stopped.

mike wiz

unread,
Oct 4, 2022, 9:44:18 AM10/4/22
to MPF Users
If you don't already have a version of MPF working you should still be able to install the old way.

A Kaljunen

unread,
Oct 4, 2022, 12:37:13 PM10/4/22
to MPF Users
I think, that MPF working all those personal computers as I have told also with CobraPin controller, but MC (Media Controller) does not. I have started now with command MPF -x and here is result in picture.DSC_1780.JPG

cobra18t

unread,
Oct 4, 2022, 1:20:16 PM10/4/22
to MPF Users
The media controller does appear to be crashing due to the import error. You are seeing "Waiting for Media Controller" because MPF is running, but the MC crashed. In the case of running the command mpf -x, you are only starting MPF and not the MC, so again, MPF is just waiting for the MC to start.

I do not have experience with the inner workings of the MC, but an import error sounds like you are missing a dependency or have an incompatible dependency. audio_interface.pyx is crashing when it is first loaded. Here is the first part of that file. Perhaps confirm you have the dependencies and report back on the versions of each.

#!python
#cython: embedsignature=True, language_level=3
"""
Audio Library
This library requires the SDL2, SDL_Mixer, and Gstreamer libraries.
"""

from libc.stdio cimport FILE, fopen, fprintf, sprintf, fflush
from libc.string cimport memset, memcpy
from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free
cimport cpython.pycapsule as pycapsule

from math import pow
import logging

from mpfmc.core.audio.sdl2 cimport *
from mpfmc.core.audio.gstreamer cimport *
from mpfmc.core.audio.track cimport *
from mpfmc.core.audio.track_standard cimport *
from mpfmc.core.audio.track_sound_loop cimport *
from mpfmc.core.audio.sound_file cimport *
from mpfmc.core.audio.audio_exception import AudioException
from mpfmc.core.audio.playlist_controller import PlaylistController



.

Johan Gill

unread,
Oct 5, 2022, 3:12:28 AM10/5/22
to MPF Users
Hello.
I now got the same error. I installed from fresh on both my laptop and desktop at home a few weeks ago and it works perfectly, both those computers run Windows 11 22H1. Now I did a fresh install at work on a completely new computer (Windows 11 22H2, I used the exact same installation method used on the others and I just got the error. 

What I can see in my log files is that the installation I did today is using "mpfmc : Mission Pinball Framework Media Controller v0.56.0-dev34" while the installation two weeks ago uses "mpfmc : Mission Pinball Framework Media Controller v0.56.0-dev33".
I will try and downgrade to mpf-mc dev33 and see if it helps but that will be done tonight, not earlier. :(
2022-10-05-08-37-45-mc-CF-ADMS019.log

Johan Gill

unread,
Oct 5, 2022, 3:37:27 AM10/5/22
to MPF Users
I can confirm that it works when I install  pip install mpf-mc==0.56.0.dev33 and injects it again. Something is broken with dev34 on Windows 11.
Message has been deleted

A Kaljunen

unread,
Oct 5, 2022, 3:55:56 AM10/5/22
to MPF Users
I have also Mission Pinball Framework Media Controller v0.56.0-dev34 in my win 10 home, and same kind behavior as you have, but... In the beginning I installed python 3.9.13 with win 64 bit installer, because this version should work. Does it make any harm in entity?
Message has been deleted

Johan Gill

unread,
Oct 5, 2022, 4:07:03 AM10/5/22
to MPF Users
I downgraded with these commands if you wanna try...  not sure if there is some other way to do it.

pipx install "mpf-mc==0.56.0.dev33" --pip-args="--pre" --verbose --include-deps
and after
pipx inject mpf mpf-mc==0.56.0.dev33 --pip-args="--pre" --verbose --include-deps --include-apps

A Kaljunen

unread,
Oct 5, 2022, 5:16:58 AM10/5/22
to MPF Users
Huge thanks man, it worked now! But, if I kill both windows from mpf game engine window with kill command CRTL + C, it kill both windows and my COM4 connection and can't work anymore untill I boot my Cobrapin connection. But, when I terminate my MPF MC window with mouse in right corner, it kill game engine also, and I can start it again normally command mpf both! It might be my code, because this part I have tested yet. I haven't even checked how those both should stop in right way :)


2022-10-05 11:35:27,608 : INFO : YamlMultifileConfigLoader : Machine config file #1: config.yaml
2022-10-05 11:35:27,608 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\a0da40bb4ac72fc142af0ef80a717128.mpf_cache
2022-10-05 11:35:27,687 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\d1a7ca7de8681a6a2bb3dff017b23ec0.mpf_cache
2022-10-05 11:35:27,687 : INFO : ConfigProcessor : Loading config from cache: C:\Users\aslak\AppData\Local\Temp\316ffff2cd22eae9acf8e1247f7fc240.mpf_cache
2022-10-05 11:35:27,687 : INFO : Machine : Mission Pinball Framework Core Engine v0.56.0-dev33
2022-10-05 11:35:27,687 : INFO : Machine : Command line arguments: {'no_load_cache': False, 'create_config_cache': True, 'bcp': True, 'configfile': ['config.yaml'], 'force_assets_load': False, 'jsonlogging': False, 'logfile': 'logs\\2022-10-05-11-35-27-mpf-DESKTOP-H96JD62.log', 'pause': False, 'production': False, 'text_ui': True, 'loglevel': 15, 'consoleloglevel': 20, 'force_platform': None, 'syslog_address': None, 'mc_file_name': None, 'no_sound': False}
2022-10-05 11:35:27,687 : INFO : Machine : MPF path: C:\Users\aslak\.local\pipx\venvs\mpf\lib\site-packages\mpf
2022-10-05 11:35:27,687 : INFO : Machine : Machine path: C:\pinball\your_machine
2022-10-05 11:35:27,687 : INFO : Machine : Platform: win32
2022-10-05 11:35:27,687 : INFO : Machine : Python executable location: C:\Users\aslak\.local\pipx\venvs\mpf\Scripts\python.exe
2022-10-05 11:35:27,687 : INFO : Machine : Python version: 3.9.13 (64-bit)
2022-10-05 11:35:27,687 : INFO : Machine : Initialise MPF.
2022-10-05 11:35:27,843 : INFO : OPP : Connecting to com4 at 115200bps
2022-10-05 11:35:27,952 : INFO : OPP : Init of OPP board 0 done
2022-10-05 11:35:27,952 : INFO : OPP : Connecting to com5 at 115200bps
2022-10-05 11:36:16,256 : INFO : Machine : Starting the main run loop.
2022-10-05 11:36:16,257 : INFO : Machine : Shutting down...
2022-10-05 11:36:16,258 : INFO : EventManager : Event: ======'shutdown'====== Args={}
2022-10-05 11:36:16,268 : ERROR : OPP : Stop called on serial connection com4
2022-10-05 11:36:17,279 : INFO : root : MPF run loop ended.

CW Goss

unread,
Nov 24, 2022, 8:56:46 AM11/24/22
to MPF Users
Thanks!  I had the same issue on Win 10 and ran the following command lines to roll back the version:

pipx install "mpf-mc==0.56.0.dev33" --pip-args="--pre" --verbose --include-deps
and after
pipx inject mpf mpf-mc==0.56.0.dev33 --pip-args="--pre" --verbose --include-deps --include-apps

Reply all
Reply to author
Forward
0 new messages