Created
November 13, 2021 11:46
-
-
Save anatoly-scherbakov/ee60c200986e664bd944ed3712569591 to your computer and use it in GitHub Desktop.
Cryptic `LUUU` error when adding an invalid triple into graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sys import version as python_version | |
from rdflib import RDF, SDO, ConjunctiveGraph, Literal, URIRef | |
from rdflib import __version__ as rdflib_version | |
from rdflib import plugin | |
from rdflib.store import Store | |
from rdflib_sqlalchemy import __version__ as rdflib_sqlalchemy_version | |
logger = logging.getLogger(__name__) | |
def test_sqlalchemy_luuu(): | |
logger.info(f'Python version: {python_version}') | |
logger.info(f'RDFLib version: {rdflib_version}') | |
logger.info(f'RDFLib-SQLAlchemy version: {rdflib_sqlalchemy_version}') | |
identifier = URIRef('local://test_sqlalchemy_luuu/') | |
store = plugin.get( | |
'SQLAlchemy', | |
Store, | |
)( | |
identifier=identifier, | |
) | |
graph = ConjunctiveGraph( | |
store=store, | |
identifier=identifier, | |
) | |
graph.open('sqlite:///', create=True) | |
graph.add([ | |
Literal('https://example.org'), # <--- sic! | |
RDF.type, | |
SDO.WebSite, | |
URIRef('https://example.org/about/'), | |
]) |
Author
anatoly-scherbakov
commented
Nov 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment