johnnoone / json-spec

Implements some tools for JSON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error with Python 2.7

rpavlik opened this issue · comments

Trying to run json validate on the command line, I get this traceback:

json validate --schema-file .\display_descriptor_schema_1.json --document-file .\apps\displays\HMD.json
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\json.exe\__main__.py", line 9, in <module>
  File "C:\Python27\lib\site-packages\jsonspec\cli\__init__.py", line 504, in main
    args.func(args)
  File "C:\Python27\lib\site-packages\jsonspec\cli\__init__.py", line 172, in __call__
    return self.run(args)
  File "C:\Python27\lib\site-packages\jsonspec\cli\__init__.py", line 451, in run
    validated = load(args.schema).validate(args.document)
  File "C:\Python27\lib\site-packages\jsonspec\validators\__init__.py", line 37, in load
    return factory(schema, uri or '#')
  File "C:\Python27\lib\site-packages\jsonspec\validators\factorize.py", line 86, in __call__
    return compiler(schema, pointer, context)
  File "C:\Python27\lib\site-packages\jsonspec\validators\draft04.py", line 221, in compile
    compiled = compile(subschema, subpointer, context, scope)
  File "C:\Python27\lib\site-packages\jsonspec\validators\draft04.py", line 221, in compile
    compiled = compile(subschema, subpointer, context, scope)
  File "C:\Python27\lib\site-packages\jsonspec\validators\draft04.py", line 49, in compile
    scope = urljoin(scope or str(pointer), schm.pop('id', None))
TypeError: pop() takes at most 1 argument (2 given)

obviously, a sub schema is loaded as an array, not an object.
can you send me your schema ?