I have installed dev-java/javatoolkit-0.6.0 on my Python3.7 system (from my local overlay) While installing sci-geosciences/josm-10966 I get >>> Configuring source in /var/tmp/portage/sci-geosciences/josm-10966/work/josm-10966 ... cElementTree rewriter Traceback (most recent call last): File "/usr/lib/python-exec/python3.7/build-xml-rewrite", line 62, in <module> main() File "/usr/lib/python-exec/python3.7/build-xml-rewrite", line 58, in main tree.write(f) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 777, in write short_empty_elements=short_empty_elements) File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__ next(self.gen) File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 836, in _get_writer yield file.write File "/usr/lib/python3.7/contextlib.py", line 511, in __exit__ raise exc_details[1] File "/usr/lib/python3.7/contextlib.py", line 496, in __exit__ if cb(*exc_details): File "/usr/lib/python3.7/contextlib.py", line 383, in _exit_wrapper callback(*args, **kwds) TypeError: write() argument must be str, not bytes * ERROR: sci-geosciences/josm-10966::gentoo failed (configure phase): * build-xml-rewrite failed Many thanks for a hint. By the way, josm-9999 is broken since EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/javatoolkit.git" isn't valid any more.
Created attachment 549580 [details, diff] check if the xml file is empty It turned out that a build.xml file was empty. The attached patches just skips empty xml-files.
I'm having the same problem, but it isn't because of empty files as addressed by the patch. The issue is that the file should be opened with mode 'wb'.
Created attachment 555818 [details, diff] patch for xml file open in correct mode for py3
Berendzen's patch is sufficient for me. I can confirm it works.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/javatoolkit.git/commit/?id=adf9ed1917ab33ff0db1b9646a7e174c8e3e9184 commit adf9ed1917ab33ff0db1b9646a7e174c8e3e9184 Author: Miroslav Šulc <fordfrog@gentoo.org> AuthorDate: 2019-10-29 21:20:03 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2019-10-29 21:20:53 +0000 fix - check if xml file is empty Bug: https://bugs.gentoo.org/667590 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> src/py/build-xml-rewrite | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee82c0047a4661cf61246a6263290de6e8583715 commit ee82c0047a4661cf61246a6263290de6e8583715 Author: Miroslav Šulc <fordfrog@gentoo.org> AuthorDate: 2019-10-29 21:47:17 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2019-10-29 21:51:18 +0000 dev-java/javatoolkit-0.6.2: bump Closes: https://bugs.gentoo.org/667590 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> dev-java/javatoolkit/Manifest | 1 + dev-java/javatoolkit/javatoolkit-0.6.2.ebuild | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+)