Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

PCF8574 #43

Closed
nikitachukov opened this issue Jun 14, 2016 · 1 comment
Closed

PCF8574 #43

nikitachukov opened this issue Jun 14, 2016 · 1 comment

Comments

@nikitachukov
Copy link

Dear friends, thanks a lot for porting to python 3. I tried to run the following code:

from Adafruit_GPIO. PCF8574 import PCF8574,OUT
from time import  sleep

expander=PCF8574(address=0x38)
expander.setup(0,OUT)

while True:
    expander.output(0,True)
    sleep(0.5)
    expander.output(0,False)

and caught an exception

Traceback (most recent call last):
  File "/share/rover/trash/PCF8574_test.py", line 6, in <module>
    expander.setup(0,OUT)
  File "/root/rover3/lib/python3.4/site-packages/Adafruit_GPIO-1.0.0-py3.4.egg/Adafruit_GPIO/PCF8574.py", line 68, in setup
  File "/root/rover3/lib/python3.4/site-packages/Adafruit_GPIO-1.0.0-py3.4.egg/Adafruit_GPIO/PCF8574.py", line 71, in setup_pins
AttributeError: 'dict' object has no attribute 'iteritems'

I think this is issue.
pep-0469

@nmcross
Copy link

nmcross commented Sep 26, 2017

Doesn't this just need the change of .iteritems() to .items() in code? I think this is a python2 to python3 migration issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants