Skip to content

jsonschema: error: argument -i/--instance: invalid _json_file value #489

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

Closed
Benjamin-Lee opened this issue Nov 9, 2018 · 3 comments
Closed

Comments

@Benjamin-Lee
Copy link

This seems related to #299, but by reading the thread, I still don't have a clear idea of what I need to do in order to fix this problem.

(env) Benjamins-MacBook-Pro-9:flow-chem BenjaminLee$ jsonschema -i schemas/apparatus_example.json schemas/apparatus.schema.json
usage: jsonschema [-h] [-i INSTANCES] [-F ERROR_FORMAT] [-V VALIDATOR] schema
jsonschema: error: argument -i/--instance: invalid _json_file value: 'schemas/apparatus_example.json'
(env) Benjamins-MacBook-Pro-9:flow-chem BenjaminLee$ chardetect schemas/apparatus_example.json
schemas/apparatus_example.json: ascii with confidence 1.0
(env) Benjamins-MacBook-Pro-9:flow-chem BenjaminLee$ chardetect schemas/apparatus.schema.json
schemas/apparatus.schema.json: ascii with confidence 1.0
(env) Benjamins-MacBook-Pro-9:flow-chem BenjaminLee$ python3 -c "import locale; print(locale.getpreferredencoding())"
UTF-8
@Julian
Copy link
Member

Julian commented Nov 9, 2018 via email

@Benjamin-Lee
Copy link
Author

Fixed it! The error was an extra comma.

Is it possible to get a more descriptive error?

@Julian
Copy link
Member

Julian commented Nov 9, 2018 via email

Julian added a commit that referenced this issue Jun 24, 2021
0aefbb3d Merge pull request #491 from jdesrosiers/object-contains-tests
336ef8d2 Merge pull request #452 from LeifRilbe/rilbe/propertyNames-with-pattern
2dfbc79c Simplify the test case names as well.
b6d0649d Add tests for contains with objects
da687ca5 Enforce a consistent code style for contains tests
b163efcf Merge pull request #490 from jdesrosiers/draft-future
7c8cb488 Initialize draft-future with 2020-12 tests
4d65d2df Merge pull request #483 from kylef/kylef/date
ee9dcaa7 Merge pull request #485 from marksparkza/contains-with-false-if
eaa5bffc Merge pull request #489 from json-schema-org/ether/more-recursiveRef
7c33b533 dynamic $recursiveRef test with cousin $recursiveAnchors
8a3a542b Fix invalid JSON error
8a89f58e Add tests combining remote refs and defs
3aec0d14 Add tests combining relative refs and defs
a107d196 fix: $defs -> definitions in draft 6,7 tests
0c223de2 Remove a test for undefined $id behavior
4efec180 Test that "contains" does not fail due to false "if" subschema
bf383b4c fix: make identifiers unique across tests
812f1f08 Merge pull request #484 from json-schema-org/ether/schemas-under-unknown-keywords
64f6b850 Test that identifiers are not found inside unrecognized keywords
c69a89c6 Stricter date format constraints
93193442 Test cases for propertyNames with pattern - update after PR feedback.
8e4aad95 Test cases for propertyNames with pattern.

git-subtree-dir: json
git-subtree-split: 0aefbb3d80e0caa22f3782677cf09c61b2205aa7
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