[elbe-devel] upgrade from elbe 12.3 to 12.5 triggers encode error
ew.foe at nassur.net
ew.foe at nassur.net
Tue Aug 11 15:27:52 CEST 2020
Hello Bastian,
thanks for your lightning fast reply.
Quoting Bastian Germann <bage at linutronix.de>:
> Hi Erich,
>
> There was a patch posted at
> https://lists.linutronix.de/pipermail/elbe-devel/2020-August/004867.html
> with request for comment. The .bin file offered by the website is
> actually a .patch file.
>
> If you can confirm that the patch works for you, I will include it in git.
The original patch
#+begin_src diff
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index c8acc217..b0b5c766 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -637,7 +637,7 @@ class WaitProjectBusyAction(ClientAction):
if msg == 'ELBE-FINISH':
break
- print(msg)
+ print(msg.encode(encoding="utf-8", error="replace"))
# exited the while loop -> the project is not busy anymore,
# check, whether everything is ok.
#+end_src
produces a different trace:
> 20200811-150120 submit build
> "tmp.x86_64-pc-hdimg-grub-uefi-buster-devel.xml" ...
> 20200811-150120 + /space/ew/tools/elbe/v12.5/elbe initvm
> --directory=/space/ew/elbe-initvms/initvm-v12.5 --output ./tmp.build
> submit --skip-build-bin --skip-build-sources
> tmp.x86_64-pc-hdimg-grub-uefi-buster-devel.xml
> Traceback (most recent call last):
> File "/space/ew/tools/elbe/v12.5/elbe", line 62, in <module>
> cmdmod.run_command(sys.argv[2:])
> File "/space/ew/tools/elbe/v12.5/elbepack/commands/control.py",
> line 189, in run_command
> action.execute(control, opt, args[1:])
> File "/space/ew/tools/elbe/v12.5/elbepack/soapclient.py", line
> 640, in execute
> print(msg.encode(encoding="utf-8", error="replace"))
> TypeError: 'error' is an invalid keyword argument for this function
> elbe control wait_busy Failed
>
> The project will not be deleted from the initvm.
But deleting the error argument:
#+begin_src diff
ew at drtux-d10:/space/ew/tools/elbe/v12.5/elbepack$ diff -wu
soapclient.py.orig soapclient.py
--- soapclient.py.orig 2020-08-11 14:59:27.121578996 +0200
+++ soapclient.py 2020-08-11 15:06:13.781584279 +0200
@@ -637,7 +637,7 @@
if msg == 'ELBE-FINISH':
break
- print(msg)
+ print(msg.encode(encoding="utf-8"))
# exited the while loop -> the project is not busy anymore,
# check, whether everything is ok.
#+end_src
Does work for me. The build completes successfully.
:-)
Whether or not the ( ... , error="replace") argument /should/ work, I
don't know.
I'm working on debian 10 with current updates:
$ python --version
Python 2.7.16
$ python3 --version
Python 3.7.3
I noticed that the "elbe" script itself is still python2:
$ head ./elbe
#!/usr/bin/env python2
...
Thanks,
Erich
>
> Thanks,
> Bastian
More information about the elbe-devel
mailing list