adafruit / Adafruit_CircuitPython_SSD1327

DisplayIO drivers for grayscale OLEDs driven by SSD1327
MIT License
3 stars 7 forks source link

AttributeError: module 'displayio' has no attribute 'I2CDisplay'. Did you mean: 'BusDisplay'? #24

Open NathanRibo opened 5 days ago

NathanRibo commented 5 days ago

I am trying to access from a Rasberry Pi3B+ using I2C to the display. I have installed Adfruit-Blinka(8.47.0) and Circuitpython perfectly. Later I also install ‘adafruit-circuitpython-ssd1327(1.4.1)’, when I run the example code I get this error: No module named ‘displayio’. Then I install adafruit-blinka-displayio (2.1.0). When I run the code again I get this error: AttributeError: module ‘displayio’ has no attribute ‘I2CDisplay’. Did you mean: ‘BusDisplay’?

Can someone help me to solve this problem? Which version of dafruit-blinka-displayio should I install? Thank you very much

tannewt commented 5 days ago

Sorry about that! We're in the process of moving that class to a separate module and blinka displayio's backwards compatibility isn't correct. In displayio/__init__.py you'll need to import i2cdisplaybus and set I2CDisplay = I2CDisplayBus

tannewt commented 5 days ago

PR to fix it is here: https://github.com/adafruit/Adafruit_Blinka_Displayio/pull/141