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

Python version check bug #1780

Closed
JamCam opened this issue May 25, 2022 · 3 comments · Fixed by #1757
Closed

Python version check bug #1780

JamCam opened this issue May 25, 2022 · 3 comments · Fixed by #1757

Comments

@JamCam
Copy link

JamCam commented May 25, 2022

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()

@peternewman
Copy link
Member

Hi @JamCam ,

This has already been fixed:

if sys.version_info >= (3, 2):

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 peternewman added this to the 0.10.9 milestone Nov 19, 2022
@peternewman
Copy link
Member

Did that work for you @JamCam ?

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

@peternewman
Copy link
Member

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

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

Successfully merging a pull request may close this issue.

2 participants