adafruit / Adafruit_CircuitPython_SSD1322

DisplayIO driver for grayscale OLEDs driven by SSD1322
MIT License
7 stars 5 forks source link

Library not usable #21

Closed majuss closed 2 months ago

majuss commented 2 months ago

I have a single line: import adafruit_ssd1322

On a Raspberry Pi 4 3.11.2 This already fails with:

Traceback (most recent call last):
  File "/home/pi/displaytestvenv/test.py", line 2, in <module>
    import adafruit_ssd1322
  File "/home/pi/displaytestvenv/lib/python3.11/site-packages/adafruit_ssd1322.py", line 67, in <module>
    class SSD1322(displayio.Display):
                  ^^^^^^^^^^^^^^^^^
AttributeError: module 'displayio' has no attribute 'Display'. Did you mean: 'displays'?
dastels commented 2 months ago

Are all the modules/libraries up to date?

majuss commented 2 months ago

yes fresh venv.

FoamyGuy commented 2 months ago

I think the class that the the driver extends at the class definition here: https://github.com/adafruit/Adafruit_CircuitPython_SSD1322/blob/986794594b53956068a26a49d4ad66c3f4cdfbc4/adafruit_ssd1322.py#L67 needs to change to busdisplay.BusDisplay in order to be used on the latest versions of circuitpython core.

FoamyGuy commented 2 months ago

This should be resolved by https://github.com/adafruit/Adafruit_Blinka_Displayio/pull/136 I don't have this exact display to test but tried to get as close as possible with a different display driver modified to make it like this one.

Please update to the latest Blinka_DisplayIO version and try again. If you still have any issues feel free to re-open this or create a new one if appropriate.