Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with whyis tutorial #258

Open
kavonrtep opened this issue Feb 22, 2021 · 0 comments
Open

problem with whyis tutorial #258

kavonrtep opened this issue Feb 22, 2021 · 0 comments

Comments

@kavonrtep
Copy link

I am trying to test whyis by following your tutorial on https://tetherless-world.github.io/whyis/tutorial using
The first error I get is in step:
whyis$ python3 manage.py load -i http://orion.tw.rpi.edu/~jimmccusker/dataset.ttl -f turtle
I get:

python3 ../whyis/manage.py load -i http://orion.tw.rpi.edu/~jimmccusker/dataset.ttl -f turtle
Traceback (most recent call last):
File "/usr/local/lib/python3.7/urllib/request.py", line 1350, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/lib/python3.7/http/client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1032, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 972, in send
self.connect()
File "/usr/local/lib/python3.7/http/client.py", line 944, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
raise err
File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "../whyis/manage.py", line 7, in
Manager().run()
File "/usr/local/lib/python3.7/site-packages/flask_script/init.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/usr/local/lib/python3.7/site-packages/flask_script/init.py", line 386, in handle
res = handle(*args, **config)
File "/usr/local/lib/python3.7/site-packages/flask_script/commands.py", line 216, in call
return self.run(*args, **kwargs)
File "/apps/whyis/whyis/commands/load_nanopub.py", line 46, in run
g1 = load_nanopub_graph(location=input_file, format=file_format, store=g.store)
File "/apps/whyis/whyis/blueprint/nanopub/nanopub_utils.py", line 34, in load_nanopub_graph
inputGraph.parse(data=data, location=location, format=format, publicID=current_app.NS.local)
File "/usr/local/lib/python3.7/site-packages/rdflib/graph.py", line 1068, in parse
format=format,
File "/usr/local/lib/python3.7/site-packages/rdflib/parser.py", line 193, in create_input_source
input_source = URLInputSource(absolute_location, format)
File "/usr/local/lib/python3.7/site-packages/rdflib/parser.py", line 113, in init
file = urlopen(req)
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 1378, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/local/lib/python3.7/urllib/request.py", line 1352, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

Second, I am consistently getting when I try to restart apache error:

root@f4314fe986bd:/apps/my_knowledge_graph# service apache2 restart
[FAIL] Restarting Apache httpd web server: apache2 failed!

Third - creating user fails. Documentatation says:Registration is available on the website for users but there is no such option available on web interface, additionaly when I run according manual :
/whyis$ python manage.py createuser -u testuser -p testpassword --roles=admin

I get:

File "manage.py", line 7, in
Manager().run()
File "/usr/local/lib/python3.7/site-packages/flask_script/init.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/usr/local/lib/python3.7/site-packages/flask_script/init.py", line 386, in handle
res = handle(*args, **config)
File "/usr/local/lib/python3.7/site-packages/flask_script/commands.py", line 216, in call
return self.run(*args, **kwargs)
File "/apps/whyis/whyis/commands/create_user.py", line 29, in run
role_objects = [flask.current_app.datastore.find_or_create_role(name=r) for r in roles.split(',')]
File "/apps/whyis/whyis/commands/create_user.py", line 29, in
role_objects = [flask.current_app.datastore.find_or_create_role(name=r) for r in roles.split(',')]
File "/usr/local/lib/python3.7/site-packages/flask_security/datastore.py", line 211, in find_or_create_role
return self.find_role(name) or self.create_role(**kwargs)
File "/apps/whyis/whyis/datastore/datastore_utils.py", line 29, in f
result = fn(self,*args,**kw)
File "/apps/whyis/whyis/datastore/whyis_user_datastore.py", line 42, in find_role
if (role_uri, RDF.type, self.Role.rdf_type) not in self.db:
File "/usr/local/lib/python3.7/site-packages/rdflib/graph.py", line 1381, in contains
for t in self.triples((s, p, o), context=c):
File "/usr/local/lib/python3.7/site-packages/rdflib/graph.py", line 1452, in triples
for (s, p, o), cg in self.store.triples((s, p, o), context=context):
File "/usr/local/lib/python3.7/site-packages/rdflib/plugins/stores/sparqlstore.py", line 273, in triples
default_graph=context.identifier if self._is_contextual(context) else None)
File "/usr/local/lib/python3.7/site-packages/rdflib/plugins/stores/sparqlstore.py", line 150, in _query
return super(SPARQLStore, self).query(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/rdflib/plugins/stores/sparqlconnector.py", line 96, in query
res.raise_for_status()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://localhost:8080/blazegraph/namespace/admin/sparql

I guess something is missing in documentation?
best
Petr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant