Skip to content

Could not resolve import (ASHRAE/S223P) #391

@XaelZeph

Description

@XaelZeph

I'm trying to validate a model that I created based on the s223p ontology. I tried a few ways to do this, but they all gave me errors.

I first tried to validate using:

buildingmotif_s223 = Library.load(ontology_graph=r"../BuildingMOTIF/libraries/ashrae/223p/ontology/223p.ttl")
constraints = Library.load(ontology_graph="../BuildingMOTIF/buildingmotif/libraries/constraints/constraints.ttl")

model.validate([buildingmotif_s223, constraints])

But this raised the error:

compiled_model = self.compile(shape_collections or [self.get_manifest()])
ontology_graph += shape_collection.graph
                      ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Library' object has no attribute 'graph'

Then I tried:

model.update_manifest(buildingmotif_s223.get_shape_collection())
model.update_manifest(constraints.get_shape_collection())

model.validate()

But this raised the error:

Exception: ('Could not resolve import of %s', rdflib.term.URIRef('http://data.ashrae.org/standard223/1.0/model/equipment'))

Since the first validation seemed to fail because it could not find shape graph in after compiling model, I tried to manually compile model with:

compiled_model = model.compile([s223.get_shape_collection()])
# and
compiled_model = model.compile([s223.get_shape_collection(), constraints.get_shape_collection()])

both of which raised:

I also tried this with
s223 = Library.load(ontology_graph="https://open223.info/223p.ttl")
and
Exception: ('Could not resolve import of %s', rdflib.term.URIRef('http://qudt.org/2.1/vocab/currency'))

Are these exceptions - being unable to resolve import - due to these ontologies being out of date? Or buildingMOTIF being unable to find the updated ontologies?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions