# 5.2 Beta2 GrampsLocale does not have format function (add to list of changes)

**URL:** <https://gramps.discourse.group/t/5-2-beta2-grampslocale-does-not-have-format-function-add-to-list-of-changes/4091>\
**Category:** Beta Testing\
**Created:** [August 29, 2023, 12:40am UTC](https://gramps.discourse.group/t/5-2-beta2-grampslocale-does-not-have-format-function-add-to-list-of-changes/4091 "2023-08-29T00:40:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [August 29, 2023, 12:40am UTC](https://gramps.discourse.group/t/5-2-beta2-grampslocale-does-not-have-format-function-add-to-list-of-changes/4091/1 "2023-08-29T00:40:26Z")

</div>

On MacOS loaded beta2. Testing some of my plugins and find that the GrampsLocale object is missing the format attribute. This function formats a number in the current locale. See gen/utils/grampslocale.py . This is now replaced by the python locale object, format attribute.

This might need to be in the change list.

Specific details: 5.1 gramplet code used the following and it worked:

> from gramps.gen.const import GRAMPS\_LOCALE as glocale  
> tooltip\_text += glocale.format(‘%d’,self.segments, grouping = True)

But 5.2 generates the error:

> AttributeError: ‘GrampsLocale’ object has no attribute ‘format’

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [August 29, 2023, 11:34am UTC](https://gramps.discourse.group/t/5-2-beta2-grampslocale-does-not-have-format-function-add-to-list-of-changes/4091/2 "2023-08-29T11:34:57Z")

</div>

The underlying python [`format`](https://docs.python.org/3/library/locale.html#locale.format) method in the locale module has been deprecated since 3.7 and will be removed in 3.12 due to be released later this year.

See pull request [#1463](https://github.com/gramps-project/gramps/pull/1463).
