Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apigpio failing to import Pi on raspberrypi example setup #1427

Closed
arthurlutz opened this issue Oct 4, 2019 · 4 comments
Closed

apigpio failing to import Pi on raspberrypi example setup #1427

arthurlutz opened this issue Oct 4, 2019 · 4 comments
Labels
Milestone

Comments

@arthurlutz
Copy link

pi@pizerow:~/mpf $ mpf 
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 212, in initialise
    yield from self.initialise_core_and_hardware()
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 197, in initialise_core_and_hardware
    self._load_hardware_platforms()
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 497, in _load_hardware_platforms
    self.add_platform(hardware_platform)
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/machine.py", line 614, in add_platform
    hardware_platform = Util.string_to_class(self.config['mpf']['platforms'][name])
  File "/usr/local/lib/python3.7/dist-packages/mpf/core/utility_functions.py", line 588, in string_to_class
    m = __import__(module)
  File "/usr/local/lib/python3.7/dist-packages/mpf/platforms/rpi/rpi.py", line 20, in <module>
    import apigpio
  File "/usr/local/lib/python3.7/dist-packages/apigpio/__init__.py", line 2, in <module>
    from .apigpio import Pi

Versions

pi@pizerow:~/mpf $ pip3 list
Package          Version  
---------------- ---------
apigpio          0.0.2    
asciimatics      1.11.0   
asn1crypto       0.24.0   
certifi          2018.8.24
chardet          3.0.4    
cryptography     2.6.1    
entrypoints      0.3      
future           0.17.1   
idna             2.6      
keyring          17.1.1   
keyrings.alt     3.1.1    
mpf              0.52.7   
pigpio           1.44     
Pillow           6.2.0    
pip              18.1     
psutil           5.6.3    
pycrypto         2.6.1    
pyfiglet         0.8.post1
PyGObject        3.30.4   
pyserial         3.4      
pyserial-asyncio 0.4      
python-apt       1.8.4    
pyxdg            0.25     
requests         2.21.0   
ruamel.yaml      0.15.37  
SecretStorage    2.3.1    
setuptools       40.8.0   
six              1.12.0   
ssh-import-id    5.7      
terminaltables   3.1.0    
typing           3.7.4.1  
urllib3          1.24.1   
wcwidth          0.1.7    
wheel            0.32.3   
@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 4, 2019

Weird error. Is there more after the error? On first glance it looks like an error inside the lib. Maybe some lib isn't matching the pigpio lib? I will give it a try later.

You need to start the pigpio deamon which then opens the port: http://abyz.me.uk/rpi/pigpio/pigpiod.html

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 27, 2019

Seems to be a Python 3.7 issues. async became a reserved keyword which breaks upstream. Create a PR there. Hope they accept it. Otherwise we will fork it as apigpio-mpf.

@jabdoa2 jabdoa2 added the bug label Oct 27, 2019
@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 30, 2019

I created an mpf apigpio repo here: https://github.com/missionpinball/apigpio. Will push that to pypi in a few days.

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Dec 27, 2019

@jabdoa2 jabdoa2 closed this as completed Jul 24, 2020
@jabdoa2 jabdoa2 added this to the 0.54 milestone Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants