diff --git a/prez/repositories/remote_sparql.py b/prez/repositories/remote_sparql.py index 5053d268..47bd3148 100755 --- a/prez/repositories/remote_sparql.py +++ b/prez/repositories/remote_sparql.py @@ -15,6 +15,12 @@ class RemoteSparqlRepo(Repo): def __init__(self, async_client: httpx.AsyncClient): self.async_client = async_client + if not settings.sparql_endpoint: + raise ValueError( + "When using a remote SPARQL endpoint, " + "the SPARQL_ENDPOINT setting must be set using either " + "the environment variable or the config file." + ) async def _send_query(self, query: str, mediatype="text/turtle"): """Sends a SPARQL query asynchronously.