# Translation ERROR when they being loaded

**URL:** https://discuss.tryton.org/t/translation-error-when-they-being-loaded/7936
**Category:** Developer
**Created:** [October 8, 2024, 5:58pm UTC](https://discuss.tryton.org/t/translation-error-when-they-being-loaded/7936 "2024-10-08T17:58:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mahija](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a6a055/32.png) [@mahija](https://discuss.tryton.org/u/mahija)
#### Post date: [October 8, 2024, 5:58pm UTC](https://discuss.tryton.org/t/translation-error-when-they-being-loaded/7936/1 "2024-10-08T17:58:06Z")

</div>

Want to load a language, between the process it shows this error.

```auto
Traceback (most recent call last):
  File "/trytond/wsgi.py", line 117, in dispatch_request
    return endpoint(request, **request.view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/dispatcher.py", line 46, in rpc
    return methods.get(request.rpc_method, _dispatch)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/wsgi.py", line 84, in auth_required
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/wrappers.py", line 181, in wrapper
    return func(request, pool, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/dispatcher.py", line 180, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/modelview.py", line 775, in wrapper
    return func(cls, records, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/ir/lang.py", line 214, in load_translations
    load_translations(pool, node, codes)
  File "/trytond/modules/ __init__.py", line 184, in load_translations
    Translation.translation_import(language, module, files)
  File "/trytond/ir/translation.py", line 798, in translation_import
    translation, res_id = cls.from_poentry(entry)
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/ir/translation.py", line 704, in from_poentry
    ttype, name, res_id = entry.msgctxt.split(':')
    ^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 2)

```

---

<div class="post-metadata">

### Author: ![nicoe](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/nicoe/32/2880_2.png) [@nicoe](https://discuss.tryton.org/u/nicoe)
#### Post date: [October 8, 2024, 8:23pm UTC](https://discuss.tryton.org/t/translation-error-when-they-being-loaded/7936/2 "2024-10-08T20:23:57Z")

</div>

There is probably an error in the `.po` file loaded because on of its entry is not correctly formatted. It should be something like

```po
msgctxt "field:res.role,groups:"
msgid "Groups"
msgstr "Groupes"

```

Note that there are two `:` in the `msgctxt` line.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [October 9, 2024, 8:24pm UTC](https://discuss.tryton.org/t/translation-error-when-they-being-loaded/7936/3 "2024-10-09T20:24:03Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
