Opened 5 years ago
Closed 4 years ago
#58750 closed defect (fixed)
gnumeric @1.12.45_0+python27 build failure running itstool
Reported by: | hellyj | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.4 |
Keywords: | Cc: | dliessi (Davide Liessi) | |
Port: | gnumeric |
Description
Seems like itstool fails related to inability to read a data item. Log attached.
Attachments (1)
Change History (6)
Changed 5 years ago by hellyj
comment:1 Changed 5 years ago by jmroot (Joshua Root)
Keywords: | gnumeric itstool removed |
---|---|
Owner: | set to dbevans |
Port: | gnumeric added |
Status: | new → assigned |
Summary: | Error: Failed to build gnumeric: command execution failed → gnumeric @1.12.45_0+python27 build failure running itstool |
:info:build Traceback (most recent call last): :info:build File "/opt/local/bin/itstool", line 1598, in <module> :info:build doc.merge_translations(translations, opts.lang, strict=opts.strict) :info:build File "/opt/local/bin/itstool", line 962, in merge_translations :info:build self.merge_translations(translations, language, node=child, strict=strict) :info:build File "/opt/local/bin/itstool", line 962, in merge_translations :info:build self.merge_translations(translations, language, node=child, strict=strict) :info:build File "/opt/local/bin/itstool", line 962, in merge_translations :info:build self.merge_translations(translations, language, node=child, strict=strict) :info:build File "/opt/local/bin/itstool", line 962, in merge_translations :info:build self.merge_translations(translations, language, node=child, strict=strict) :info:build File "/opt/local/bin/itstool", line 964, in merge_translations :info:build newnode = self.get_translated(node, translations, strict=strict, lang=language) :info:build File "/opt/local/bin/itstool", line 1065, in get_translated :info:build msgstr.encode('utf-8'))) :info:build UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 97: ordinal not in range(128)
comment:2 Changed 5 years ago by dliessi (Davide Liessi)
Cc: | dliessi added |
---|
comment:3 Changed 5 years ago by fblaser (Florian Blaser)
Got hit by this one as well.
I was able to get past this problem by doing the following (ugly workaround):
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gnumeric/gnumeric/work/gnumeric-1.12.45/doc cp de/de.mo cs/cs.mo
And the start the install process again. (I ran itstool manually before that, but it shouldn't be necessary)
comment:4 Changed 5 years ago by bzbarsky (Boris Zbarsky)
It looks like the basic problem is that the relevant localization files have non-breaking spaces, and when something in the XML processing itstool does fails it tries to report that as a warning like so:
sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( (lang + ' ') if lang is not None else '', msgstr.encode('utf-8')))
where msgstr
is the thing containing the non-breaking space. And somewhere under the hood that tries to treat the return value of encode
as ASCII, which of course it's not, and things blow up. So the attempt to report a warning completely breaks the compile.
I managed to install gnumeric by just editing /opt/local/bin/itstool
(with sudo) to comment out those three lines. I don't know whether itstool
should be doing a try
around that statement or something else to avoid the exception there.
comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I still see the nonbreaking spaces in the msgstr in the cs po file, but I don't see this build failure anymore with gnumeric 1.12.47, so maybe there was a different cause. Shall we call it fixed? (If it's still a problem, feel free to reopen; if so, probably helpful to provide a new main.log file.)
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnumeric/gnumeric/main.log