Author Topic: issues with getting pinproc loaded  (Read 1159 times)

redundor

  • Newbie
  • *
  • Posts: 16
    • View Profile
issues with getting pinproc loaded
« on: November 28, 2015, 01:04:14 PM »
I had pyprocgame working with my judge dredd table and was running the version made by Gerry with no major issues, but being a complete beginner with python I thought I'd check out Mission Pinball Frameworks as well to see how it worked. However, it uses python 2.7 which doesn't want to work with the pyprocgame version of judge dredd. When I run it using "python" i get the following:
Code: [Select]
C:\P-ROC\pyprocgame>python games/jd/jd.py
No handlers could be found for logger "game.config"
Traceback (most recent call last):
  File "games/jd/jd.py", line 5, in <module>
    from deadworld import *
  File "C:\P-ROC\pyprocgame\games\jd\deadworld.py", line 2, in <module>
    from procgame import *
  File "C:\P-ROC\pyprocgame\games\jd/../..\procgame\dmd\__init__.py", line 11, i
n <module>
    from animation import *
  File "C:\P-ROC\pyprocgame\games\jd/../..\procgame\dmd\animation.py", line 8, i
n <module>
    import Image
ImportError: No module named Image

C:\P-ROC\pyprocgame>

Where I think i may have screwed up was that in order to get MPF to work I had uninstalled python 2.6 and installed 2.7. When I realized that I needed python 2.6 back I reinstalled it, and I re-ran the single click installer and got python 2.6 back. I still have python 2.7 in my path, so the guys over on the MPF forums told me to run C:\python26\python games/jd/jd.py. However, when I do I get this:
Code: [Select]
C:\P-ROC\pyprocgame>C:\python26\python games/jd/jd.py
Traceback (most recent call last):
  File "games/jd/jd.py", line 4, in <module>
    import pinproc
ImportError: DLL load failed: The specified module could not be found.

C:\P-ROC\pyprocgame>

I tried all of the options outlined in this thread http://www.pinballcontrollers.com/forum/index.php?topic=68 and everything is in the right place, and I can still connect to the table using MPF so I am not sure what I need to do now to get both MPF and pyprocgame working at the same time. Oh, and this is what I get when I try to import pyproc using the python command line:
Code: [Select]
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pinproc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
>>>

Does anyone have any suggestions for other things I can try?

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: issues with getting pinproc loaded
« Reply #1 on: November 29, 2015, 09:43:07 AM »
I'm not running both PyProcGame and MPF, though I'm sure someone out there must be.

The one click installer I wrote will set things up for you, but if the default Python is now 2.7, then it might be invoking Python 2.7 instead of 2.6 when the various install parts run (I'd have to double check the scripts to be sure).

I'd try setting the path to point to 2.6; re-run the one click, then close and reopen the command prompt to see if it's fixed.

Good luck!

redundor

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: issues with getting pinproc loaded
« Reply #2 on: December 04, 2015, 12:59:10 AM »
sorry for the late response, finding time to play around with this is proving to be harder than I thought it would be. The joys of having three kids under 7 I guess!

Anyway, i tried changing the path already as well as running "C:\python26\python games/jd/jd.py" from the command and both give me the same error.
Code: [Select]
C:\P-ROC\pyprocgame>C:\python26\python games/jd/jd.py
Traceback (most recent call last):
  File "games/jd/jd.py", line 4, in <module>
    import pinproc
ImportError: DLL load failed: The specified module could not be found.

C:\P-ROC\pyprocgame>

If I re-run the setup will it re-install pinproc? It seems like I have all the files in the right locations, but I just can't import pinproc for some reason...

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: issues with getting pinproc loaded
« Reply #3 on: December 04, 2015, 07:04:59 PM »
Have you looked into PYTHONPATH at all?

redundor

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: issues with getting pinproc loaded
« Reply #4 on: December 05, 2015, 01:33:36 PM »
Looking into it now and I am wondering if the PYTHONPATH is still set to look into the 2.7 folders. I did a bunch of googling buy I am totally new to python and can't figure out how to see what the PYTHONPATH is set to, or how to change it. I saw one post suggesting to add it to the environment variables, but when I tried that nothing changed. Is there a default setting somewhere that I can edit?

MOcean

  • P3 Developers
  • *
  • Posts: 822
  • Michael Ocean
    • View Profile
Re: issues with getting pinproc loaded
« Reply #5 on: December 06, 2015, 08:36:29 AM »
I haven't tried it, but of the answers to similar questions, this answer is likely your best bet:

http://stackoverflow.com/a/21433154

It should let you easily change the "py_home" variable later to switch between the location for 2.6 and 2.7 without needing to also change your PYTHONPATH.

redundor

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: issues with getting pinproc loaded
« Reply #6 on: December 06, 2015, 11:48:52 PM »
Thanks for the link, that totally helps! Makes it much easier to switch everything between the two versions. It wasn't all that was needed to get it working, but it finally is! What I did was use that link you provided to switch everything over to python 2.7, uninstalled everything related to python 2.6 and deleted the whole PROC folder and re-ran the single click installer. Now I can set the path to 2.6 and run pyprocgame or set it to 2.7 and run MPF. Thanks for the help, and I am so glad I finally got it working!