From abffe585054a6b05b060c594dcd29f3c5954faec Mon Sep 17 00:00:00 2001 From: Frederik Jaeckel Date: Thu, 12 Dec 2024 12:54:30 +0000 Subject: [PATCH] =?UTF-8?q?Home=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Home.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..f0dbb90 --- /dev/null +++ b/Home.md @@ -0,0 +1,7 @@ +Factur-x verwendet aus der Python-lib _importlib.resources_ die Funktion _files_. Diese gibt es in Python 3.8 nicht. Als Workaround kann man das umbauen: + + import pathlib + package_path = pathlib.PosixPath('/'.join(__file__.split('/')[:-1] + [xsd_file])) + xsd_etree_obj = etree.parse(package_path.open()) + # xsd_etree_obj = etree.parse(importlib.resources.files(__package__) + # .joinpath(xsd_file).open())