Cl-update utf8 error stops update in CLD

Hi Calculate enthusiasts,
cl-update is having problems and can’t complete the update due to a utf8 error.
I have rerun locale-gen using Gentoo Localization Guide and still the same result.

 # cl-update
Repositories synchronization
 * Checking current binhost ...                                                                                                                        [ ok ]
 * Checking Distros updates ...                                                                                                                        [ ok ]
 * Checking Calculate updates ...                                                                                                                      [ ok ]
 * Checking Gentoo updates ...                                                                                                                         [ ok ]
 * Update packages index ...                                                                                                                           [ ok ]
 * Check packages index signature ...                                                                                                                  [ ok ]
  * Updating the Distros repository cache ...                                                                                                           [ ok ]
 * Updating the Calculate repository cache ...
 * Updating the eix cache for  Distros, Calculate, Gentoo ...             [ ok ]
 * Updating the cache of configurable packages ...                                                                                                     [ ok ]
 * Synchronization finished
System configuration
 * Update server
 * Fixing the settings -Traceback (most recent call last):
   File "/usr/lib/python3.10/site-packages/calculate/core/server/", line 754, in run
    res = method(*args)
   File "/usr/lib/python3.10/site-packages/calculate/core/server/", line 227, in applyTemplates
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 74, in wrapper
    return f(*args, **kw)
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 88, in wrapper
    return f(self, *args, **kw)
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 4569, in applyTemplates
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 6771, in applyTemplatesClt
    if self.scanningTemplates(dirTemplate, self._chrootDir) is False:
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 6596, in scanningTemplates
   File "/usr/lib/python3.10/site-packages/calculate/lib/", line 6565, in hasBelong
    s = f.readline()
   File "/usr/lib/python-exec/python3.10/../../../lib/python3.10/", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 35: invalid start byte
 * UnicodeDecodeError:'utf-8' codec can't decode byte 0x8e in position 35: invalid start byte(codecs:322)
 * Update failed

thanks in advance for your help!

Today I ran an “emerge -va @system && emerge -va @world” which completed with out errors.
However, cl-update still threw the error, which isn’t a show stopper as the Gentoo base is running well.

The same for me.
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (fr_FR.utf-8)
Fail to fix settings default French language in Dolphin, Kconsole and KDE plasma.
I try to understand why. Any help will be appreciated.

I find the solution :

Sorry for the mistake. The solution for me : “sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8” for FRENCH. Solve the warning about setlocale. Hope that helps.

Hi Lautrec,

This gave me idea on what eventually worked.
What I used a variation of what you have and the command sequence from

First updated without full cl-update

# cl-update --sync-only && emerge -1O python:3.9 && emerge -1O glibc && emerge -1O portage

then followed the editing /etc/locale.gen and /etc/env.d/02locale
editing /etc/locale.gen - (AU is my locale, adjust the locale for your location)

en_AU.UTF-8 UTF-8

editing /etc/env.d/02locale


updated locale and checked result

# locale-gen
# locale -a

to finally get a clean cl-update running!
thank you!

Spoke too soon, after the update this error has returned.
A new error is now appearing

emerge: the given set 'world' contains a non-existent set named 'autodeps'.                                                                                             
Use `emerge --deselect @autodeps` to remove this set from world_sets.