- This topic has 6 replies, 2 voices, and was last updated 5 years, 9 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Home › Forums › Help and Support › Failed to build 3.6.1 under linux
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
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.
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
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)
.
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
Ok, so this is a side-effect of the XDG changes in r5457. Proper fix is in r5468.
Thanks. It works…
Jean-Luc