Failed to build 3.6.1 under linux

Home Forums Help and Support Failed to build 3.6.1 under linux

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #13061

    Jean-Luc Coulon
    Participant
    • Offline

    Hi,

    I got the following error while r5464 / r5465:

    M misc/z-displaycal-apply-profiles.desktop
    Generating __version__.py
    Bumping version number 3.6.1.0 -> 3.6.1.1
    Traceback (most recent call last):
    File “setup.py”, line 1174, in <module>
    setup()
    File “setup.py”, line 531, in setup
    “appstream”)})
    File “setup.py”, line 171, in replace_placeholders
    tmpl_data = tmpl_data.replace(“${%s}” % key, val)
    UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 7: ordinal not in range(128)

    Regards

    Jean-Luc

    #13062

    Florian Höch
    Administrator
    • Offline

    Can’t reproduce. Why is it saying 3.6.1.1? Are there local modifications? You’ll have to figure out on what exactly it is failing. A few print statements should help.

    #13067

    Jean-Luc Coulon
    Participant
    • Offline

    Hi,

    In fact, I was trying to build a debian package from the source tree.

    This worked fine until svn r5464/r6465.

    I already have this same message in the past on a personal applications and I solved it specifying the encoding.

    For displaycal, I’ve used the following patch and it works this way (on my linux, probably other operating system will complain):

    diff -ruN orig/setup.py new/setup.py
    — orig/setup.py 2018-08-07 16:37:16.900322115 +0200
    +++ new/setup.py 2018-08-07 16:37:02.220461636 +0200
    @@ -18,6 +18,8 @@
    import shutil
    import subprocess as sp
    import sys
    +reload (sys)
    +sys.setdefaultencoding(‘utf8’)
    import time
    if sys.platform == “win32”:
    import msilib

    (attached the patch, the formatting of the screen being lost).

    Regards

    Jean-Luc

    #13068

    Florian Höch
    Administrator
    • Offline

    That’s not what you should be doing, though (you can find examples of why sys.setdefaultencoding is a bad idea all over the web).

    Instead, you should figure out where exactly the error originates by (e.g.) adding a print repr(key), repr(val) inside the loop before tmpl_data = tmpl_data.replace(“${%s}” % key, val).

    #13069

    Jean-Luc Coulon
    Participant
    • Offline

    In fact, I know where…

    This is related to french locale: we are in August and in French, it is août (with a circumflex on the “u”).

    In Utf-8, it is encoded as 0xC3 0xBB (c3bb)

    And the system is complaining about 0xc3

    J-L

    #13070

    Florian Höch
    Administrator
    • Offline

    Ok, so this is a side-effect of the XDG changes in r5457. Proper fix is in r5468.

    #13071

    Jean-Luc Coulon
    Participant
    • Offline

    Thanks. It works…

    Jean-Luc

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Log in or Register

Display Calibration and Characterization powered by ArgyllCMS