{"action":"created","issue":{"url":"https://api.github.com/repos/AKSW/QuitStore/issues/212","repository_url":"https://api.github.com/repos/AKSW/QuitStore","labels_url":"https://api.github.com/repos/AKSW/QuitStore/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/AKSW/QuitStore/issues/212/comments","events_url":"https://api.github.com/repos/AKSW/QuitStore/issues/212/events","html_url":"https://github.com/AKSW/QuitStore/issues/212","id":389305427,"node_id":"MDU6SXNzdWUzODkzMDU0Mjc=","number":212,"title":"Blank nodes are not correctly serialized, preventing the store from restarting properly","user":{"login":"rmeissn","id":855967,"node_id":"MDQ6VXNlcjg1NTk2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/855967?v=4","gravatar_id":"","url":"https://api.github.com/users/rmeissn","html_url":"https://github.com/rmeissn","followers_url":"https://api.github.com/users/rmeissn/followers","following_url":"https://api.github.com/users/rmeissn/following{/other_user}","gists_url":"https://api.github.com/users/rmeissn/gists{/gist_id}","starred_url":"https://api.github.com/users/rmeissn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmeissn/subscriptions","organizations_url":"https://api.github.com/users/rmeissn/orgs","repos_url":"https://api.github.com/users/rmeissn/repos","events_url":"https://api.github.com/users/rmeissn/events{/privacy}","received_events_url":"https://api.github.com/users/rmeissn/received_events","type":"User","site_admin":false},"labels":[{"id":1067889579,"node_id":"MDU6TGFiZWwxMDY3ODg5NTc5","url":"https://api.github.com/repos/AKSW/QuitStore/labels/Blocked%20Upstream","name":"Blocked Upstream","color":"22b7bf","default":false},{"id":406257355,"node_id":"MDU6TGFiZWw0MDYyNTczNTU=","url":"https://api.github.com/repos/AKSW/QuitStore/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-12-10T13:38:55Z","updated_at":"2018-12-18T12:30:51Z","closed_at":"2018-12-18T11:17:19Z","author_association":"MEMBER","body":"Blank nodes are serialised in the .nt files like\r\n```\r\n<http://localhost/item/1> <http://tech4comp/eal/hasAnswerText> _:_:b1_b0 .\r\n_:_:b1_b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \"42\" .\r\n_:_:b1_b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:_:b1_b1 .\r\n_:_:b1_b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \"43\" .\r\n_:_:b1_b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:_:b1_b2 .\r\n_:_:b1_b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \"41\" .\r\n_:_:b1_b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .\r\n```\r\nJudging from the log of the quit store:\r\n```\r\n2018-12-10 13:24:15,561 - quit.modules.endpoint - DEBUG - Request method: POST\r\n2018-12-10 13:24:15,565 - quit.conf.QuitConfiguration - DEBUG - Initializing configuration object.\r\n2018-12-10 13:24:15,567 - quit.modules.endpoint - ERROR - Invalid line: '_:b1_b0 .'\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/plugins/parsers/ntriples.py\", line 140, in parse\r\n    self.parseline()\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/plugins/parsers/ntriples.py\", line 196, in parseline\r\n    self.eat(r_tail)\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/plugins/parsers/ntriples.py\", line 210, in eat\r\n    raise ParseError(\"Failed to eat %s at %s\" % (pattern.pattern, self.line))\r\nrdflib.plugins.parsers.ntriples.ParseError: Failed to eat [ \\t]*\\.[ \\t]*(#.*)? at _:b1_b0 .\r\nDuring handling of the above exception, another exception occurred:\r\nTraceback (most recent call last):\r\n  File \"./quit/web/modules/endpoint.py\", line 93, in sparql\r\n    graph, commitid = quit.instance(branch_or_ref)\r\n  File \"./quit/core.py\", line 192, in instance\r\n    (f, context) = self.getFileReferenceAndContext(blob, commit)\r\n  File \"./quit/core.py\", line 411, in getFileReferenceAndContext\r\n    graph.parse(data=content, format='nt')\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/graph.py\", line 1043, in parse\r\n    parser.parse(source, self, **args)\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/plugins/parsers/nt.py\", line 26, in parse\r\n    parser.parse(f)\r\n  File \"/usr/local/lib/python3.7/site-packages/rdflib/plugins/parsers/ntriples.py\", line 142, in parse\r\n    raise ParseError(\"Invalid line: %r\" % self.line)\r\nrdflib.plugins.parsers.ntriples.ParseError: Invalid line: '_:b1_b0 .'\r\n```\r\nI guess that `_:_:XYZ` is not parseable. The actual query (logged as of the commit) looked like:\r\n```\r\nQuery: \"INSERT DATA {\r\n      GRAPH <http://localhost:3000/data> {\r\n        <http://localhost/item/1> <http://purl.org/dc/terms/title> \\\"Test Question\\\".\r\n        <http://localhost/item/1> <http://tech4comp/eal/context> \\\"This is a test setting\\\".\r\n        <http://localhost/item/1> <http://tech4comp/eal/difficulty> \\\"9.6E0\\\"^^<http://www.w3.org/2001/XMLSchema#double>.\r\n        <http://localhost/item/1> <http://tech4comp/eal/hasAnswerText> _:b1_b0.\r\n        _:b1_b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \\\"42\\\".\r\n        _:b1_b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b1_b1.\r\n        _:b1_b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \\\"43\\\".\r\n        _:b1_b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b1_b2.\r\n        _:b1_b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> \\\"41\\\".\r\n        _:b1_b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>.\r\n      }\r\n    }\"\r\n```\r\nwhich is the correct blank node syntax. I guess blank nodes are somehow wrongly serialised to the .nt file. The actual error occurs as soon as the store is restarted, trying to read the wrongly serialized files."},"comment":{"url":"https://api.github.com/repos/AKSW/QuitStore/issues/comments/448204697","html_url":"https://github.com/AKSW/QuitStore/issues/212#issuecomment-448204697","issue_url":"https://api.github.com/repos/AKSW/QuitStore/issues/212","id":448204697,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODIwNDY5Nw==","user":{"login":"rmeissn","id":855967,"node_id":"MDQ6VXNlcjg1NTk2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/855967?v=4","gravatar_id":"","url":"https://api.github.com/users/rmeissn","html_url":"https://github.com/rmeissn","followers_url":"https://api.github.com/users/rmeissn/followers","following_url":"https://api.github.com/users/rmeissn/following{/other_user}","gists_url":"https://api.github.com/users/rmeissn/gists{/gist_id}","starred_url":"https://api.github.com/users/rmeissn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmeissn/subscriptions","organizations_url":"https://api.github.com/users/rmeissn/orgs","repos_url":"https://api.github.com/users/rmeissn/repos","events_url":"https://api.github.com/users/rmeissn/events{/privacy}","received_events_url":"https://api.github.com/users/rmeissn/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T12:30:51Z","updated_at":"2018-12-18T12:30:51Z","author_association":"MEMBER","body":"Created issue #217 by request of @white-gecko"}}
{"actor":{"display_login":"rmeissn"}}