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

Problem when executing Python Generation Script #26

Open
ignapzs opened this issue Mar 21, 2023 · 3 comments
Open

Problem when executing Python Generation Script #26

ignapzs opened this issue Mar 21, 2023 · 3 comments

Comments

@ignapzs
Copy link
Contributor

ignapzs commented Mar 21, 2023

After reading the scripts README, and proceed to create the virtual environment with all the required dependencies, I came across the following problem:

When executing
❯ python ./jsonschema_generator.py ../../schema/schema.json -o example1.json

then the following error appears

Traceback (most recent call last):
[....]
File "[......]/mac/scripts/python_validator/./jsonschema_generator.py", line 52, in generate_dict
generator = self.get_generator(v["type"])
KeyError: 'type'

Could this be related to each of the different element definitions like
#/$defs/person or #/$defs/location ?

@ydarias
Copy link
Collaborator

ydarias commented Mar 22, 2023

This issue is fixed by #24

@ignapzs
Copy link
Contributor Author

ignapzs commented Mar 23, 2023

Hi @ydarias .
I'm afraid to say that #24 does not fix this problem. I only submitted a PR ( #25 ) to fix #24. Problem still remains.

I just tried to explain current problem with generation script on the same way as validation one. Even one guess, based on the given returned message, as I only got basic Python skills.

My fault if I wasn't clear on my messages :/

@ydarias ydarias reopened this Mar 27, 2023
@ydarias
Copy link
Collaborator

ydarias commented Mar 27, 2023

No problem @ignapzs I will keep it open until we fix it.

And no worries, thank you very much for your help anyway ^_^

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