ModuleNotFoundError: No module named 'pinproc'

170 views
Skip to first unread message

Andrew B

unread,
Aug 15, 2020, 5:11:09 AM8/15/20
to MPF Users
Hey All,

Today I tried firing my game up on real hardware for the first time. Naturally a few issues got in the way which I was able to overcome, but I've been stuck on (hopefully) this last one. 

When running:

mpf -both

I get the following error: ModuleNotFoundError: No module named 'pinproc'

Here's the log:

2020-08-15 17:50:46,961 : INFO : Machine : MPF path: c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf
2020-08-15 17:50:46,961 : INFO : Machine : Machine path: C:\Development\pinball\pinbot-recoded
2020-08-15 17:50:46,961 : INFO : Machine : Platform: win32
2020-08-15 17:50:46,961 : INFO : Machine : Python executable location: c:\users\andrew\appdata\local\programs\python\python36\python.exe
2020-08-15 17:50:46,961 : INFO : Machine : Python version: 3.6.4 (64-bit)
2020-08-15 17:50:46,966 : INFO : Machine : Initialise MPF.
2020-08-15 17:50:47,008 : ERROR : Machine : Failed to initialise MPF
Traceback (most recent call last):
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 30, in <module>
   
import pinproc
ModuleNotFoundError: No module named 'pinproc'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 38, in <module>
   
from mpf.platforms.pinproc.windows import pinproc
ImportError: DLL load failed: The specified module could not be found.


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


Traceback (most recent call last):
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 662, in initialise_mpf
   
raise init.exception()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 238, in initialise
    await
self.initialise_core_and_hardware()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 224, in initialise_core_and_hardware
   
self._load_hardware_platforms()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 466, in _load_hardware_platforms
   
self.add_platform(hardware_platform)
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 599, in add_platform
   
self.hardware_platforms[name] = hardware_platform(self)
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc.py", line 42, in __init__
   
super().__init__(machine)
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 170, in __init__
   
'the -x command like option for now instead.') from IMPORT_ERROR
AssertionError: Could not import "pinproc". Most likely you do not have libpinproc and/or pypinproc installed. You can run MPF in software-only "virtual" mode by using the -x command like option for now instead.
2020-08-15 17:50:47,025 : INFO : root : MPF run loop ended.



I'm running:

Windows 7 - 64 bit
Python: v3.6.4 (64 bit)
MPF: 0.54.0.dev 62 
MPF: MC 0.54.0.dev15

My config setup is:

hardware:
  platform
: p_roc
  driverboards
: snux
  coils
: snux
  rgb_dmd
: smartmatrix



I followed the instructions for setting up the P-Roc drivers here: https://docs.missionpinball.org/en/latest/hardware/multimorphic/win_x64.html

I downloaded and ran CDM21228_Setup.exe, which completed without error.

I then downloaded the second file from that link and copied amd64\ftd2xx64.dll to Windows\System32 and renamed to ftd2xx.dll

I downloaded "Visual C++ Redistributable for Visual Studio 2015" and installed.

But I'm still getting that error. 

I found an interesting thread here in the group which covered a similar issue: https://groups.google.com/forum/#!msg/mpf-users/0edaJ6556sI/nHUV2zYGAgAJ

But after following that, I've not had any luck sorting the issue out. I'm hoping it's something simple I've missed. Any thoughts?

Cheers,

Andrew.

jabdoa

unread,
Aug 15, 2020, 6:01:41 AM8/15/20
to MPF Users
Can you post the output of "pip3 list"? Quinn recently recompiled libpinproc and pypinproc. Depending on your MPF version you might be in the old or new version. The new compile might also link against a different redistributable or FTDI version. We can check once we know what you are using.

Jan

Andrew B

unread,
Aug 15, 2020, 7:09:14 AM8/15/20
to MPF Users
Hi Jan,

Sure can - here you go :)

asciimatics             1.11.0
certifi                
2019.3.9
chardet                
3.0.4
docutils                
0.14
ffpyplayer              
4.3.1
future                  
0.17.1
idna                    
2.8
Kivy                    1.11.1
kivy
-deps.glew          0.1.12
kivy
-deps.glew-dev      0.1.12
kivy
-deps.gstreamer     0.1.18
kivy
-deps.gstreamer-dev 0.1.18
kivy
-deps.sdl2          0.1.23
kivy
-deps.sdl2-dev      0.1.23
Kivy-Garden             0.1.4
mpf                    
0.54.0.dev62
mpf
-mc                  0.54.0.dev15
mpf
-monitor             0.53.0
Pillow                  6.0.0
pip                    
20.2.2
prompt
-toolkit          3.0.5
psutil                  
5.7.0
pyfiglet                
0.8.post1
Pygments                2.3.1
pypiwin32              
223
PyQt5                   5.12.2
PyQt5-sip               4.19.17
pyserial                
3.4
pyserial
-asyncio        0.4
pywin32                
224
requests                
2.21.0
ruamel
.yaml             0.15.100
setuptools              
46.1.3
sortedcontainers        
2.1.0
terminaltables          
3.1.0
typing                  
3.6.6
urllib3                
1.24.2
wcwidth                
0.1.7

Cheers,

Andrew.

Andrew B

unread,
Aug 19, 2020, 12:37:45 AM8/19/20
to MPF Users
Hi Jan,

Did the output from the pip list shed any light on the issue?

I have a second spare PC and ran through the set up process on a fresh machine (also running Windows 7) but sadly have the same issue occurring on that too.

Cheers,

Andrew.

jabdoa

unread,
Aug 19, 2020, 2:08:31 AM8/19/20
to MPF Users
Hi Andrew,

Unfortunately everything looks good. Did you try MPF 0.53 (stable) before? Did it work on that version?

Jan

Andrew B

unread,
Aug 19, 2020, 2:44:42 AM8/19/20
to MPF Users
Hey Jan,

I haven't tried on 0.53 as this is my first attempt at firing it up on real hardware - so I just went with the 0.54 dev version I was running. 

I'm happy to remove the dev version though, install the latest 0.53 version and report back.

Just a thought I had - Does MPF create any temp or cache files that may be getting in the way and need to be cleared out?

Cheers,

Andrew.

Andrew B

unread,
Aug 19, 2020, 3:10:20 AM8/19/20
to MPF Users
Hi Jan,

I uninstalled 0.54 dev and installed the latest 0.53 version.

pip3 list

mpf                    
0.53.4
mpf
-mc                  0.53.6
mpf
-monitor             0.53.1

I had a hunt for any mpf cache files and found a bunch under: 

AppData\Local\Temp

I deleted these and then ran 

mpf both

This is looking better:

2020-08-19 16:55:08,648 : INFO : Machine : MPF path: c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf
2020-08-19 16:55:08,649 : INFO : Machine : Machine path: C:\Development\pinball\pinbot-recoded
2020-08-19 16:55:08,649 : INFO : Machine : Platform: win32
2020-08-19 16:55:08,649 : INFO : Machine : Python executable location: c:\users\andrew\appdata\local\programs\python\python36\python.exe
2020-08-19 16:55:08,649 : INFO : Machine : Python version: 3.6.4 (64-bit)
2020-08-19 16:55:08,649 : INFO : Machine : Machine config file #1: config.yaml
2020-08-19 16:55:08,653 : INFO : ConfigProcessor : Loading config from cache: C:\Users\Andrew\AppData\Local\Temp\e9b119f7f846804d3fbbca524bbaca24.mpf_cache
2020-08-19 16:55:08,664 : INFO : Machine : Initialise MPF.
2020-08-19 16:55:10,855 : INFO : ConfigValidator : Config spec file cache created: C:\Users\Andrew\AppData\Local\Temp\config_spec.mpf_cache
2020-08-19 16:55:14,422 : INFO : P-Roc : Connecting to P-ROC
2020-08-19 16:55:14,426 : INFO : SmartMatrixDevice : Connecting to SmartMatrix RGB DMD on com3 baud 2500000


I didn't get any error messages about the missing module and managed to get MPF waiting for the P-Roc board. I didn't have the board hooked up, which is why it's sitting there waiting for it. Most importantly though was the error message reported in my original post was gone.

I then upgrade to the latest dev version (which has a number of fixes you've made that I need).

pip install mpf mpf-mc mpf-monitor --pre --upgrade

Which put me back to the latest dev version

pip3 list

mpf                    
0.54.0.dev64
mpf
-mc                  0.54.0.dev16
mpf
-monitor             0.54.0.dev4

I again ran 

mpf both

But the error is now back:

2020-08-19 17:07:07,139 : INFO : Machine : MPF path: c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf
2020-08-19 17:07:07,140 : INFO : Machine : Machine path: C:\Development\pinball\pinbot-recoded
2020-08-19 17:07:07,140 : INFO : Machine : Platform: win32
2020-08-19 17:07:07,140 : INFO : Machine : Python executable location: c:\users\andrew\appdata\local\programs\python\python36\python.exe
2020-08-19 17:07:07,141 : INFO : Machine : Python version: 3.6.4 (64-bit)
2020-08-19 17:07:07,149 : INFO : Machine : Initialise MPF.
2020-08-19 17:07:07,435 : ERROR : Machine : Failed to initialise MPF
Traceback (most recent call last):
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 30, in <module>
   
import pinproc
ModuleNotFoundError: No module named 'pinproc'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 38, in <module>
   
from mpf.platforms.pinproc.windows import pinproc
ImportError: DLL load failed: The specified module could not be found.


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


Traceback (most recent call last):

 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 663, in initialise_mpf
   
raise init.exception()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 239, in initialise
    await
self.initialise_core_and_hardware()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 225, in initialise_core_and_hardware
   
self._load_hardware_platforms()
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 467, in _load_hardware_platforms
   
self.add_platform(hardware_platform)
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\core\machine.py", line 600, in add_platform
   
self.hardware_platforms[name] = hardware_platform(self)

 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc.py", line 42, in __init__
   
super().__init__(machine)
 
File "c:\users\andrew\appdata\local\programs\python\python36\lib\site-packages\mpf\platforms\p_roc_common.py", line 170, in __init__
   
'the -x command like option for now instead.') from IMPORT_ERROR
AssertionError: Could not import "pinproc". Most likely you do not have libpinproc and/or pypinproc installed. You can run MPF in software-only "virtual" mode by using the -x command like option for now instead.

So it does look like there is something between the last 0.53 version and latest dev that's causing it. 

Cheers,

Andrew.




















jabdoa

unread,
Aug 19, 2020, 5:09:33 AM8/19/20
to MPF Users
Quinn recompiled those. We need to have a look what changed. I suspect that some dependencies were liked in a different version or something similar. I will contact Quinn tonight about that. Unfortunately, I'm not so keen in debugging the windows linker.


Jan

Andrew B

unread,
Aug 19, 2020, 6:40:21 AM8/19/20
to MPF Users
No worries, thanks for following it up. 

If there is any more information (or testing) I can provide either of you with, just let me know :)

Andrew.

Quinn Capen

unread,
Aug 19, 2020, 10:17:24 AM8/19/20
to MPF Users
I did recompile the pinproc libraries for Windows a few weeks ago and I could not fully test them because I do not own any P-ROC hardware.  However, I am able to import the pinproc library on the python command line. I did use FTDI v2.12.28 (although it is dynamically linked so should not be sensitive to the version). libpinproc is statically linked into the pinproc library so no separate installation is necessary on Windows and the pinproc dlls do not need to be installed via pypi as they are included in the mpf release. 

Can you try installing the Microsoft Visual C++ redistributable files from this link:  https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads rather than the one in the documentation? The new libraries have been built with Visual Studio 2019 (not 2015 as before), but the runtime libraries are supposed to be compatible. I will update the installation instructions if this fixes the issue. If that doesn't resolve your issue there are a few other steps we can take to try to debug this.

Quinn

Quinn Capen

unread,
Aug 19, 2020, 10:33:36 AM8/19/20
to MPF Users
The Microsoft Visual C++ Runtime Libraries as referenced in the installation instructions are definitely a problem as the newer ones for VS 2019 need to be used.  I have updated the installation instructions in the documentation accordingly.  Please let me know if this resolves your issue or you are still having problems.

Thanks,

Quinn

Andrew B

unread,
Aug 19, 2020, 9:36:34 PM8/19/20
to MPF Users
Hi Quinn,

Thank you for looking in the issue - running the new VC++ install looks to have fixed the issue. The error message is gone and I'm now sitting at "waiting for connection". I have a day off tomorrow so will hook the P-Roc board back up and see if I can flip my game for the first time :)

Cheers,

Andrew.
Reply all
Reply to author
Forward
0 new messages