Advertisement
vishvas

Untitled

Oct 31st, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.18 KB | None | 0 0
  1. ERROR: 2017-10-31 17:11:54,152 {common.py:288}: Exception message: {'required': ['jsonClass'], 'properties': {'names': {'type': 'array', 'items': {'required': ['jsonClass'], 'properties': {'script_renderings': {'type': 'array', 'minItems': 1, 'items': {'required': ['jsonClass', 'text'], 'properties': {'jsonClass': {'enum': ['ScriptRendering'], 'type': 'string'}, 'encoding_scheme': {'type': 'string'}, 'text': {'type': 'string'}}, 'type': 'object'}}, 'jsonClass': {'enum': ['Text'], 'type': 'string'}, 'language_code': {'type': 'string'}}, 'type': 'object'}, 'minItems': 1}, 'jsonClass': {'enum': ['NamedEntity'], 'type': 'string'}}, 'type': 'object'} is not valid under any of the given schemas
  2. ERROR: 2017-10-31 17:11:54,155 {common.py:289}: Schema is: {"description": "A BookPortion could represent a Book or a chapter or a verse or a half-verse or a sentence or any such unit.", "properties": {"base_data": {"enum": ["image", "text"], "type": "string"}, "creation_details": {"properties": {"authors": {"items": {"properties": {"jsonClass": {"enum": ["NamedEntity"], "type": "string"}, "names": {"items": {"properties": {"jsonClass": {"enum": ["Text"], "type": "string"}, "language_code": {"type": "string"}, "script_renderings": {"items": {"properties": {"encoding_scheme": {"type": "string"}, "jsonClass": {"enum": ["ScriptRendering"], "type": "string"}, "text": {"type": "string"}}, "required": ["jsonClass", "text"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}, "type": "array"}, "jsonClass": {"enum": ["CreationDetails", "NamedEntity"], "type": "string"}, "names": {"items": {"properties": {"jsonClass": {"enum": ["Text"], "type": "string"}, "language_code": {"type": "string"}, "script_renderings": {"items": {"properties": {"encoding_scheme": {"type": "string"}, "jsonClass": {"enum": ["ScriptRendering"], "type": "string"}, "text": {"type": "string"}}, "required": ["jsonClass", "text"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass", "name"], "type": "object"}, "curated_content": {"properties": {"jsonClass": {"enum": ["Text"], "type": "string"}, "language_code": {"type": "string"}, "script_renderings": {"items": {"properties": {"encoding_scheme": {"type": "string"}, "jsonClass": {"enum": ["ScriptRendering"], "type": "string"}, "text": {"type": "string"}}, "required": ["jsonClass", "text"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}, "jsonClass": {"enum": ["BookPortion"], "type": "string"}, "path": {"type": "string"}, "portion_class": {"description": "book, part, chapter, verse, line etc..", "type": "string"}, "publication_details": {"description": "Publication details of a BookPortion.", "properties": {"canonical_source": {"type": "string"}, "issue_page": {"type": "string"}, "jsonClass": {"enum": ["PublicationDetails"], "type": "string"}, "publisher": {"type": {"properties": {"jsonClass": {"enum": ["NamedEntity"], "type": "string"}, "names": {"items": {"properties": {"jsonClass": {"enum": ["Text"], "type": "string"}, "language_code": {"type": "string"}, "script_renderings": {"items": {"properties": {"encoding_scheme": {"type": "string"}, "jsonClass": {"enum": ["ScriptRendering"], "type": "string"}, "text": {"type": "string"}}, "required": ["jsonClass", "text"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}, "minItems": 1, "type": "array"}}, "required": ["jsonClass"], "type": "object"}}, "release_time": {"type": "string"}}, "required": ["jsonClass"], "type": "object"}, "targets": {"description": "Target for BookPortion of which this BookPortion is a part. It is an array only for consistency. For any given BookPortion, one can get the right order of contained BookPortions by seeking all BookPortions referring to it in the targets list, and sorting them by their target.position values.", "items": {"description": "A BookPortion could represent a Book or a chapter or a verse or a half-verse or a sentence or any such unit.", "properties": {"container_id": {"type": "string"}, "jsonClass": {"enum": ["Target", "BookPositionTarget"], "type": "string"}, "position": {"description": "Any number describing the position of one BookPortion within another.", "type": "number"}}, "required": ["container_id", "jsonClass"], "type": "object"}, "maxLength": 1}, "thumbnail_path": {"type": "string"}}, "required": ["jsonClass"], "type": "object"}
  3. ERROR: 2017-10-31 17:11:54,155 {common.py:290}: Context is: [<ValidationError: "{'required': ['jsonClass'], 'properties': {'names': {'type': 'array', 'items': {'required': ['jsonClass'], 'properties': {'script_renderings': {'type': 'array', 'minItems': 1, 'items': {'required': ['jsonClass', 'text'], 'properties': {'jsonClass': {'enum': ['ScriptRendering'], 'type': 'string'}, 'encoding_scheme': {'type': 'string'}, 'text': {'type': 'string'}}, 'type': 'object'}}, 'jsonClass': {'enum': ['Text'], 'type': 'string'}, 'language_code': {'type': 'string'}}, 'type': 'object'}, 'minItems': 1}, 'jsonClass': {'enum': ['NamedEntity'], 'type': 'string'}}, 'type': 'object'} is not one of ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string']">, <ValidationError: "{'required': ['jsonClass'], 'properties': {'names': {'type': 'array', 'items': {'required': ['jsonClass'], 'properties': {'script_renderings': {'type': 'array', 'minItems': 1, 'items': {'required': ['jsonClass', 'text'], 'properties': {'jsonClass': {'enum': ['ScriptRendering'], 'type': 'string'}, 'encoding_scheme': {'type': 'string'}, 'text': {'type': 'string'}}, 'type': 'object'}}, 'jsonClass': {'enum': ['Text'], 'type': 'string'}, 'language_code': {'type': 'string'}}, 'type': 'object'}, 'minItems': 1}, 'jsonClass': {'enum': ['NamedEntity'], 'type': 'string'}}, 'type': 'object'} is not of type 'array'">]
  4. ERROR: 2017-10-31 17:11:54,157 {common.py:291}: Best match is: {'required': ['jsonClass'], 'properties': {'names': {'type': 'array', 'items': {'required': ['jsonClass'], 'properties': {'script_renderings': {'type': 'array', 'minItems': 1, 'items': {'required': ['jsonClass', 'text'], 'properties': {'jsonClass': {'enum': ['ScriptRendering'], 'type': 'string'}, 'encoding_scheme': {'type': 'string'}, 'text': {'type': 'string'}}, 'type': 'object'}}, 'jsonClass': {'enum': ['Text'], 'type': 'string'}, 'language_code': {'type': 'string'}}, 'type': 'object'}, 'minItems': 1}, 'jsonClass': {'enum': ['NamedEntity'], 'type': 'string'}}, 'type': 'object'} is not one of ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string']
  5.  
  6. Failed validating 'enum' in schema[0]:
  7. {'enum': ['array',
  8. 'boolean',
  9. 'integer',
  10. 'null',
  11. 'number',
  12. 'object',
  13. 'string']}
  14.  
  15. On instance:
  16. {'properties': {'jsonClass': {'enum': ['NamedEntity'],
  17. 'type': 'string'},
  18. 'names': {'items': {'properties': {'jsonClass': {'enum': ['Text'],
  19. 'type': 'string'},
  20. 'language_code': {'type': 'string'},
  21. 'script_renderings': {'items': {'properties': {'encoding_scheme': {'type': 'string'},
  22. 'jsonClass': {'enum': ['ScriptRendering'],
  23. 'type': 'string'},
  24. 'text': {'type': 'string'}},
  25. 'required': ['jsonClass',
  26. 'text'],
  27. 'type': 'object'},
  28. 'minItems': 1,
  29. 'type': 'array'}},
  30. 'required': ['jsonClass'],
  31. 'type': 'object'},
  32. 'minItems': 1,
  33. 'type': 'array'}},
  34. 'required': ['jsonClass'],
  35. 'type': 'object'}
  36. Traceback (most recent call last):
  37. File "/home/vvasuki/vedavaapi_py_api/vedavaapi_py_api/run.py", line 107, in <module>
  38. main(sys.argv[1:])
  39. File "/home/vvasuki/vedavaapi_py_api/vedavaapi_py_api/run.py", line 90, in main
  40. setup_app()
  41. File "/home/vvasuki/vedavaapi_py_api/vedavaapi_py_api/run.py", line 51, in setup_app
  42. textract.setup_app(db=ullekhanam_db)
  43. File "/home/vvasuki/vedavaapi_py_api/vedavaapi_py_api/textract/__init__.py", line 17, in setup_app
  44. get_db().import_all(rootdir=paths.DATADIR)
  45. File "/home/vvasuki/vedavaapi_py_api/vedavaapi_py_api/ullekhanam/backend/db/collections.py", line 44, in import_all
  46. book_portion_node.update_collection(self)
  47. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 470, in update_collection
  48. self.content = self.content.update_collection(db_interface)
  49. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 248, in update_collection
  50. self.validate(db_interface)
  51. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 390, in validate
  52. super(JsonObjectWithTarget, self).validate(db_interface=db_interface)
  53. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 266, in validate
  54. self.validate_schema()
  55. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 292, in validate_schema
  56. raise e
  57. File "/usr/local/lib/python3.6/dist-packages/sanskrit_data/schema/common.py", line 276, in validate_schema
  58. jsonschema.validate(json_map, self.schema)
  59. File "/usr/local/lib/python3.6/dist-packages/jsonschema/validators.py", line 545, in validate
  60. cls.check_schema(schema)
  61. File "/usr/local/lib/python3.6/dist-packages/jsonschema/validators.py", line 88, in check_schema
  62. raise SchemaError.create_from(error)
  63. jsonschema.exceptions.SchemaError: {'required': ['jsonClass'], 'properties': {'names': {'type': 'array', 'items': {'required': ['jsonClass'], 'properties': {'script_renderings': {'type': 'array', 'minItems': 1, 'items': {'required': ['jsonClass', 'text'], 'properties': {'jsonClass': {'enum': ['ScriptRendering'], 'type': 'string'}, 'encoding_scheme': {'type': 'string'}, 'text': {'type': 'string'}}, 'type': 'object'}}, 'jsonClass': {'enum': ['Text'], 'type': 'string'}, 'language_code': {'type': 'string'}}, 'type': 'object'}, 'minItems': 1}, 'jsonClass': {'enum': ['NamedEntity'], 'type': 'string'}}, 'type': 'object'} is not valid under any of the given schemas
  64.  
  65. Failed validating 'anyOf' in metaschema['properties']['properties']['additionalProperties']['properties']['properties']['additionalProperties']['properties']['type']:
  66. {'anyOf': [{'$ref': '#/definitions/simpleTypes'},
  67. {'items': {'$ref': '#/definitions/simpleTypes'},
  68. 'minItems': 1,
  69. 'type': 'array',
  70. 'uniqueItems': True}]}
  71.  
  72. On schema['properties']['publication_details']['properties']['publisher']['type']:
  73. {'properties': {'jsonClass': {'enum': ['NamedEntity'],
  74. 'type': 'string'},
  75. 'names': {'items': {'properties': {'jsonClass': {'enum': ['Text'],
  76. 'type': 'string'},
  77. 'language_code': {'type': 'string'},
  78. 'script_renderings': {'items': {'properties': {'encoding_scheme': {'type': 'string'},
  79. 'jsonClass': {'enum': ['ScriptRendering'],
  80. 'type': 'string'},
  81. 'text': {'type': 'string'}},
  82. 'required': ['jsonClass',
  83. 'text'],
  84. 'type': 'object'},
  85. 'minItems': 1,
  86. 'type': 'array'}},
  87. 'required': ['jsonClass'],
  88. 'type': 'object'},
  89. 'minItems': 1,
  90. 'type': 'array'}},
  91. 'required': ['jsonClass'],
  92. 'type': 'object'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement