-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using usage-example with generator.py #1190
Comments
What a coincidence, I just ran into the same error! However, I only used a $ python scripts/generator.py --out ~/tmp --subset subset.yaml --oss
Loading schemas from local files
Running generator. ECS version 2.0.0-dev
Traceback (most recent call last):
File "scripts/generator.py", line 106, in <module>
main()
File "scripts/generator.py", line 60, in main
es_template.generate_legacy(flat, ecs_version, out_dir, args.template_settings, args.mapping_settings)
File "/var/home/lwille/src/ext/ecs/scripts/generators/es_template.py", line 109, in generate_legacy
generate_legacy_template_version(6, ecs_version, mappings_section, out_dir, template_settings_file)
File "/var/home/lwille/src/ext/ecs/scripts/generators/es_template.py", line 115, in generate_legacy_template_version
template = template_settings(es_version, ecs_version, mappings_section, template_settings_file)
File "/var/home/lwille/src/ext/ecs/scripts/generators/es_template.py", line 202, in template_settings
error_stack_trace_mappings = mappings_section['properties']['error']['properties']['stack_trace']
KeyError: 'error' subset.yaml: ---
name: json_filebeat
fields:
base:
fields:
"@timestamp": {} $ git rev-parse HEAD
83ced31c9da6b3e5599b01e319a827a7941e6439
$ python3 --version
Python 3.8.1
$ pip3 list | grep -i -E '(yaml|pep|mock|git|jinja)'
aspy.yaml 1.3.0
autopep8 1.4.4
gitdb 4.0.5
githubrelease 1.5.8
GitPython 3.1.2
Jinja2 2.11.2
mock 4.0.2
PyYAML 5.3b1
yamllint 1.19.0 |
@faudebert you might want to try checking out the |
Thanks to both @faudebert for the great issue writeup and @lwille for chiming in with the guidance! You've uncovered a bug introduced recently with some feature work, but a fix will be merged soon (PR #1191). As @lwille pointed out, using the latest release tag, |
Description of the problem including expected versus actual behavior:
Trying
script/generator.py
for the first time, I stumble upon a stack trace throwingKeyError: 'error'
. I initially though I maybe passed wrong parameters but it looks like example documented inUSAGE.md
also have the same issue.Thanks for writing this tool, I'm eager to use it since it can greatly help me to generate/maintain configuration for custom Beats indices. Let me know if I can somehow help you further.
Steps to reproduce:
git clone https://github.com/elastic/ecs && cd ecs
generator.py
as documented inUSAGE.md
:Provide logs (if relevant):
Any additional context:
The text was updated successfully, but these errors were encountered: