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

SSD1322: Python 3.7 to 3.9-3.11 upgrade fail #320

Open
majuss opened this issue Dec 15, 2020 · 17 comments
Open

SSD1322: Python 3.7 to 3.9-3.11 upgrade fail #320

majuss opened this issue Dec 15, 2020 · 17 comments

Comments

@majuss
Copy link

majuss commented Dec 15, 2020

Hi guys,
I'am in the process of upgrading my project from Python 3.7 to 3.9 but the Luma.oled library is spazzing out.. In the attached picture you see a scrolling text. With 3.7 everything works fine but with Python 3.9 the scrolling text is completely broken. Minimal static examples all work.

RPI 3B+
5.4.79-v7+
Version: luma.oled 3.8.1 (luma.core 2.2.0)
Python3.9.1 completely fresh venv

Package                          Version
-------------------------------- ---------
Adafruit-Blinka                  5.9.1
adafruit-circuitpython-bme280    2.5.1
adafruit-circuitpython-bme680    3.3.0
adafruit-circuitpython-busdevice 5.0.1
Adafruit-GPIO                    1.0.3
Adafruit-PlatformDetect          2.23.0
Adafruit-PureIO                  1.1.8
cbor2                            5.2.0
certifi                          2020.12.5
chardet                          3.0.4
Cython                           0.29.21
dbus-python                      1.2.16
Deprecated                       1.2.10
idna                             2.10
luma.core                        2.2.0
luma.oled                        3.8.1
mock                             4.0.3
pi-ina219                        1.3.0
pi-rc522                         2.2.1
Pillow                           8.0.1
pip                              20.3.2
pycairo                          1.20.0
pyftdi                           0.52.0
PyGObject                        3.38.0
pyserial                         3.5
python-lirc                      1.2.3
python-mpv                       0.5.2
pyusb                            1.1.0
requests                         2.25.0
rpi-ws281x                       4.2.5
RPi.GPIO                         0.7.0
setuptools                       49.2.1
smbus2                           0.4.0
spidev                           3.5
sysv-ipc                         1.0.1
urllib3                          1.26.2
wheel                            0.36.2
wrapt                            1.12.1
xmltodict                        0.12.0

Expected behaviour

Scrolling text without artifacts.
Code can be found here: https://github.com/majuss/wladio/blob/master/radio/display.py

Actual behaviour

Scrolling text with haevy glitches.

The runner example is also broken, if I don't stretch it across the whole screen.
index

index

I will update this issue with my findings.

@thijstriemstra
Copy link
Collaborator

can you doublecheck if the installed package versions for 3.7 vs 3.9 are the same?

@majuss
Copy link
Author

majuss commented Dec 15, 2020

luma.core                        2.2.0
luma.oled                        3.8.1
Pillow                           8.0.1

Just tested it with the same versions in Python3.7. No problems there.

@rm-hull
Copy link
Owner

rm-hull commented Dec 15, 2020

Hi @majuss , which oled driver is it?
I experienced some odd glitches recently with pillow > 7.1.2 & python 3.8 when using the ssd1309 driver.
Could you try python 3.9 with pillow 7.1.2 and report back please?

@majuss
Copy link
Author

majuss commented Dec 16, 2020

I use a SSD1322 and no same glitches with 7.1.2.

@thijstriemstra
Copy link
Collaborator

smbus2 recently had a big update as well, but probably unrelated to glitches..

@majuss
Copy link
Author

majuss commented Jan 23, 2021

Tried again with most recent packages. Exactly the same :(

@thijstriemstra
Copy link
Collaborator

@majuss so it doesn't work with Pillow 8.x on Python 3.9 but Pillow 7.1.2 on Python 3.9 is ok? And Python 3.7 is always ok?

Tried again with most recent packages. Exactly the same :(

Please specify which ones and version nrs.

@majuss
Copy link
Author

majuss commented Jan 24, 2021

Python3.9 never works pillow version doesn't matter. Python3.7 is always okay.

@rm-hull
Copy link
Owner

rm-hull commented Jan 26, 2021

Well the interesting thing here is that the tests target python 3.6, 3.7, 3.8 and 3.9, and while they generally substitute the interface (I2C / SPI) for a mock, they do check to make sure the correct sequence of bytes is being produced for all the different displays across all versions of Python (albeit on Ubuntu / intel rather than Raspian / arm)

So that leads me to the following questions:

  • How have you installed Python 3.9 ? From source or a specific binary?
  • Which OS are you using?
  • Have you tried Python 3.8?

Everything you've said (and not said so far) points to it being a local issue, so we really need to know more about your setup

@majuss
Copy link
Author

majuss commented Jan 26, 2021

I use the latest version of Raspbian on a RPI 3B+. Didn't tried Python3.8 yet. I installed Python directly from source.

@majuss
Copy link
Author

majuss commented Sep 1, 2021

I switched to a Pi 4 and now everything works with Python3.9

@majuss majuss closed this as completed Sep 1, 2021
@majuss majuss reopened this Oct 30, 2023
@majuss
Copy link
Author

majuss commented Oct 30, 2023

@rm-hull The exact same behaviour is back again with Python 3.11 latest raspberry pi os bookworm. I already freshly installed everything.

@thijstriemstra
Copy link
Collaborator

@majuss what version of Pillow are you using? Can you test with latest (10.1.0)?

@majuss
Copy link
Author

majuss commented Oct 31, 2023

Here you go:
image

@thijstriemstra thijstriemstra changed the title Migration from Python 3.7 to 3.9 gone bad SSD1322: Python 3.7 to 3.9/3.11 upgrade fail Nov 1, 2023
@thijstriemstra thijstriemstra changed the title SSD1322: Python 3.7 to 3.9/3.11 upgrade fail SSD1322: Python 3.7 to 3.9-3.11 upgrade fail Nov 1, 2023
@majuss
Copy link
Author

majuss commented Dec 4, 2023

@thijstriemstra how can I debug this? Even the runner example etc. is showing these artefacts again :/

@majuss
Copy link
Author

majuss commented Jul 14, 2024

The pillow version doesnt matter. The bug is there even with 9.4

@rm-hull
Copy link
Owner

rm-hull commented Jul 14, 2024

Can you reproduce it on other devices?

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

No branches or pull requests

3 participants