ola icon indicating copy to clipboard operation
ola copied to clipboard

Python version check bug

Open JamCam opened this issue 3 years ago • 1 comments

Hi

Your python version check in OlaClient.py fails on Python 3.10

line 957 if sys.version >= '3.2': request.data = data.tobytes() else: request.data = data.tostring()

The best solution I can see, others may have a better solution, is

pv = platform.python_version_tuple() if int(pv[0]) >= 3 and int(pv[1]) > 2: request.data = data.tobytes() else: request.data = data.tostring()

JamCam avatar May 25 '22 14:05 JamCam

Hi @JamCam ,

This has already been fixed: https://github.com/OpenLightingProject/ola/blob/e95de59a04c79ddd6ba745578e4183301f4b98b7/python/ola/OlaClient.py#L955

See #1757 .

You might need to run from source if you're doing stuff with Python 3, although unfortunately even there, there are a few outstanding issues. Some (but not all) are sorted in #1761 .

peternewman avatar May 26 '22 00:05 peternewman

Did that work for you @JamCam ?

Let us know if you see any other Python 3 related bugs during your usage of it.

peternewman avatar Nov 19 '22 18:11 peternewman

I'll close this as it's a duplicate of #1755 and was fixed in #1757 .

peternewman avatar Feb 15 '23 03:02 peternewman