Startup errors with Python3
Closed this issue · 0 comments
synergiator commented
Hi,
following the README I can't get the tool running with Python 3 for a Python generation.
Example Dockerfile:
FROM python:3.6
RUN pip3 install lstgen &&\
lstgen 2014 python --class-name Lohnsteuer2014 --outfile lst2014.py
Error:
usage: lstgen [-h] [-l LANG] [-p PAP] [-x XML_PATH] [--pap-versions]
[--outfile OUTFILE] [--class-name CLASS_NAME] [--indent INDENT]
[--java-package-name JAVA_PACKAGE] [--php-ns PHP_NAMESPACE]
lstgen: error: unrecognized arguments: 2014 python
Following the help, I have also tried:
FROM python:3.6
RUN pip3 install lstgen &&\
lstgen -p 2017 -l python
but then get the following error:
/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "/usr/local/bin/lstgen", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/lstgen/cli.py", line 113, in main
pap_parser = PapParser(etree.fromstring(xml_content))
File "/usr/local/lib/python3.6/site-packages/lstgen/__init__.py", line 253, in __init__
self.parse()
File "/usr/local/lib/python3.6/site-packages/lstgen/__init__.py", line 259, in parse
main_element = self.tree_root.xpath('/PAP/METHODS/MAIN')[0]
IndexError: list index out of range