[Python-modules-team] Bug#812672: Bug#812672: djangorestframework: FTBFS - TypeError: a bytes-like object is required, not 'str'

Brian May bam at debian.org
Tue Jan 26 00:03:01 UTC 2016


Brian May <bam at debian.org> writes:

> (sid-amd64)root at prune:/tmp/brian/tmp9rNvFP/build/amd64# LANG=C.UTF-8 mkdocs

Oh, I guess you don't have the C.UTF-8 locale defined. For me, I do.

That means, for me, the following code will detect a non-ascii codec,
and exit before running the faulty code.
    
    try:
        import locale
        fs_enc = codecs.lookup(locale.getpreferredencoding()).name
    except Exception:
        fs_enc = 'ascii'
    if fs_enc != 'ascii':
        return

I will file a bug against python3-click now.

Actually I have a feeling that even the python3 issue fixed, that won't
solve the FTBFS problem. It looks like the code that fails is code that
picks the most appropriate fatal error because the above test failed :-(
-- 
Brian May <bam at debian.org>



More information about the Python-modules-team mailing list