Skip to content
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

jinja2.exceptions.UndefinedError: 'soa' is undefined #2

Open
gilbertoferreira opened this issue Oct 1, 2020 · 1 comment
Open

jinja2.exceptions.UndefinedError: 'soa' is undefined #2

gilbertoferreira opened this issue Oct 1, 2020 · 1 comment

Comments

@gilbertoferreira
Copy link

Hi

Try to convert certain domain.json to db.domain.com and get the error

jinja2.exceptions.UndefinedError: 'soa' is undefined

./bindZoneMaker.py -z domain.json > db.domain.com
Traceback (most recent call last):
File "./bindZoneMaker.py", line 50, in
main(sys.argv[1:])
File "./bindZoneMaker.py", line 42, in main
print(template.render(dnszonejson))
File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "./zone.j2", line 12, in top-level template code
@ IN SOA {{ soa['mname'] }} {{ soa['rname'] }}(
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 411, in getitem
return obj[argument]
jinja2.exceptions.UndefinedError: 'soa' is undefined

@shahwahed
Copy link
Owner

Hi,
can you check if in your json you have defined correctly the soa in it? could you past your json file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants