On 7/16/25 9:02 AM, Javier Martinez wrote: > Read this BEFORE getting a flamethrower > > This filename in /etc/portage/package.env directory: > > 'aften'$'\303' > > > caused a general python DOS, all portage tools related fail with this > error: > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in > position 30: surrogates not allowed > > However it's hard to get detected the origin, stracing dispatch-conf > did, stracing emerge with forks... don't at least to me. > > With all tools fail I want mean ALL, dispatch-conf included for example. > > Portage was unable to decode from unicode and reencode. > > If this damned error happens to you check which part of python trace > points to, sometimes marks filename as the responsible > > I expect that this helps you to avoid getting crazy by this error, avoid > crying, and avoid you to reinstall gentoo from the begining and since > it's the FOURTH time that it happens to me in four distincts systems, at > least I will find a way to find the answer around there in the mail > list....
This is caused by a really bad idea that someone had to "fix" python for the python2 -> python3 migration. Python natively handles various arguments as both str and bytes, portage pointlessly converts them to bytes in a way that only works some of the time because "it looks like how python2 did it". That being said I do wonder how you originally accidentally created this filename... -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature