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

Fix module 'locale' has no attribute 'format' #2776

Merged

Conversation

dwrobel
Copy link
Contributor

@dwrobel dwrobel commented Dec 11, 2023

Fixes the following error on python 3.12:
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/qtvcp/widgets/origin_offsetview.py",
line 383, in periodic_check
self.reload_offsets()
File "/usr/lib/python3.12/site-packages/qtvcp/widgets/origin_offsetview.py",
line 270, in reload_offsets
degree_tmpl = "%{}.2f".format(len(locale.format(tmpl, 0)))
^^^^^^^^^^^^^
AttributeError: module 'locale' has no attribute 'format'. Did you mean: '_format'?

See also: python/cpython#94226

Fixes the following error on python 3.12:
 Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/qtvcp/widgets/origin_offsetview.py",
   line 383, in periodic_check
    self.reload_offsets()
  File "/usr/lib/python3.12/site-packages/qtvcp/widgets/origin_offsetview.py",
   line 270, in reload_offsets
    degree_tmpl = "%{}.2f".format(len(locale.format(tmpl, 0)))
                                      ^^^^^^^^^^^^^
 AttributeError: module 'locale' has no attribute 'format'. Did you mean: '_format'?

See also: python/cpython#94226

Signed-off-by: Damian Wrobel <dwrobel.contractor@libertyglobal.com>
@hansu
Copy link
Member

hansu commented Dec 11, 2023

Looks good to me. Should better go into 2.9 I think.

@c-morley
Copy link
Collaborator

I think locale is an artifact from converting from gladevcp anyways. Will back port/remove if required later. Thanks.

@c-morley c-morley merged commit 78e2ce1 into LinuxCNC:master Dec 12, 2023
11 checks passed
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

Successfully merging this pull request may close these issues.

3 participants