Closed weimir closed 1 year ago
Funktioniert bei mir immer noch nicht, mit folgendem Aufruf:
docker run \ --rm \ -u $(id -u):$(id -g) \ -v $(pwd):/app \ -e MODEL=Planungszonen_V1_1 \ -e THEME_CODE=ch.Planungszonene \ -e TARGET_BASKET_ID=ch.Planungszonen \ -e OEREBLEX_HOST="oereblex.gr.ch" \ -e XTF_FILE=3834_2023-04-18_pz_oereb_a48cf5d52e390e930b6528b5f4da77b1.xtf \ -e CATALOG=ch.gr.OeREBKRMkvs_supplement_pz.xml\ -e PYRAMID_OEREB_CONFIG_PATH="/app/config.yaml" \ -e SECTION="pyramid_oereb" \ -e OEREBLEX_CANTON="gr" \ -e DUMMY_OFFICE_NAME="ALG" \ -e DUMMY_OFFICE_URL="https://alg.gr.ch" \ -e SOURCE_CLASS_PATH="geolink2oereb.lib.interfaces.pyramid_oereb.OEREBlexSourceCustom" \ -e C2CTEMPLATE_STYLE="True" \ mgdm2oereb-transformator:latest make clean mgdm2oereb-prepare-oereblex-docs-geolink2oereb mgdm2oereb-oereblex validate
Der Fehler ist:
File "/app/xsl/oereblex.geolink2oereb.py", line 81, in <module>
oereb_dokumente_aemter = run(
File "/usr/local/lib/python3.10/dist-packages/geolink2oereb/transform.py", line 33, in run
document_records = load(
File "/usr/local/lib/python3.10/dist-packages/geolink2oereb/lib/interfaces/pyramid_oereb/__init__.py", line 196, in load
Config.init(
File "/usr/local/lib/python3.10/dist-packages/pyramid_oereb/core/config.py", line 70, in init
Config._config = _parse(configfile, configsection, c2ctemplate_style)
File "/usr/local/lib/python3.10/dist-packages/pyramid_oereb/core/config.py", line 2070, in _parse
content = c2c.template.get_config(cfg_file)
File "/usr/local/lib/python3.10/dist-packages/c2c/template/__init__.py", line 128, in get_config
format_walker = FormatWalker(
File "/usr/local/lib/python3.10/dist-packages/c2c/template/__init__.py", line 193, in __init__
self.all_environment_dict[env["name"]] = os.environ[env["name"]]
File "/usr/lib/python3.10/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'pyramid_oereb.print.base_url'
Nach Einbinden aller nötigen Umgebungsvariablen hat es jetzt geklappt :)
Der Aufruf mit der geolink2oereb-Variante und der Verwendung des C2CTEMPLATE_STYLE-Parameters auf "True" funktioniert nicht. Es kommt folgende Fehlermeldung:
File "/app/xsl/oereblex.geolink2oereb.py", line 81, in
oereb_dokumente_aemter = run(
File "/usr/local/lib/python3.10/dist-packages/geolink2oereb/transform.py", line 33, in run
document_records = load(
File "/usr/local/lib/python3.10/dist-packages/geolink2oereb/lib/interfaces/pyramid_oereb/init.py", line 196, in load
Config.init(
File "/usr/local/lib/python3.10/dist-packages/pyramid_oereb/core/config.py", line 70, in init
Config._config = _parse(configfile, configsection, c2ctemplate_style)
File "/usr/local/lib/python3.10/dist-packages/pyramid_oereb/core/config.py", line 2069, in _parse
import c2c.template
ModuleNotFoundError: No module named 'c2c'
Fehlen da noch bestimmte Abhängigkeiten?