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

Validating json fails with "No module named 'jsonschema'" #3

Open
kevinkesslerit opened this issue Jan 2, 2022 · 1 comment
Open

Comments

@kevinkesslerit
Copy link

kevinkesslerit commented Jan 2, 2022

https://github.com/aborrero/python-nftables-tutorial/blob/main/nft-load-example-ruleset.py#L81

Step 2 throws this error: ERROR: failed validating json schema: No module named 'jsonschema'

pip install jsonschema does not fix this issue.

Running on Ubuntu 20.04 LTS with python3-nftables installed via package manager. Python 3.8.

@aborrero
Copy link
Owner

This is likely a problem in libnftables itself. The code does import jsonschema (see http://git.netfilter.org/nftables/tree/py/nftables.py?h=v1.0.2#n31) but that dependency is not declared anywhere in the code. So the pip package likely doesn't include it.

The debian package solves this by explicitly declaring the dependency, see https://salsa.debian.org/pkg-netfilter-team/pkg-nftables/-/blob/debian/1.0.2-1/debian/control#L91

Thanks for the report, I'll forward it to upstream developers.

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