Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/home/kristian/.virtualenvs/hydrus/src/hydra-python-core/hydra_python_core/doc_maker.py", line 61, in create_doc
- id_ = doc["@id"]
- KeyError: '@id'
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "app.py", line 15, in <module>
- agent = Agent(url)
- File "/home/kristian/.virtualenvs/hydrus/src/hydra-agent/hydra_agent/agent.py", line 30, in __init__
- self.fetch_apidoc()
- File "/home/kristian/.virtualenvs/hydrus/src/hydra-agent/hydra_agent/agent.py", line 48, in fetch_apidoc
- self.api_doc = doc_maker.create_doc(jsonld_api_doc)
- File "/home/kristian/.virtualenvs/hydrus/src/hydra-python-core/hydra_python_core/doc_maker.py", line 63, in create_doc
- raise SyntaxError("The API Documentation must have [@id]")
- SyntaxError: The API Documentation must have [@id]
- Which comes from these lines on Hydrus:
- def create_doc(doc: Dict[str, Any], HYDRUS_SERVER_URL: str = None,
- API_NAME: str = None) -> HydraDoc:
- """Create the HydraDoc object from the API Documentation.
- Raises:
- SyntaxError: If the `doc` doesn't have an entry for `@id` key.
- SyntaxError: If the `@id` key of the `doc` is not of
- the form : '[protocol] :// [base url] / [entrypoint] / vocab'
- """
- # Check @id
- try:
- id_ = doc["@id"]
- except KeyError:
- raise SyntaxError("The API Documentation must have [@id]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement