Hello everyone, after having built my ontology, and doing its enrichment with owlready2, the enrichment does not apply to my ontology on protégé, any solutions please to apply the enrichment on protégé?
Here is the error that it appears in a picture and the complete error in text file below. here is the error code : Traceback (most recent call last): File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1342, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1010, in _send_output self.send(msg) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 950, in send self.connect() File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 921, in connect self.sock = self._create_connection( File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\socket.py", line 843, in create_connection raise err File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\socket.py", line 831, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\21355\PycharmProjects\Essa\venv\lib\site-packages\owlready2\namespace.py", line 1027, in load try: fileobj = urllib.request.urlopen(url or f) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen return opener.open(url, data, timeout) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 523, in open response = meth(req, response) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 632, in http_response response = self.parent.error( File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 555, in error result = self._call_chain(*args) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain result = func(*args) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 747, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 517, in open response = self._open(req, data) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 534, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain result = func(*args) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1371, in http_open return self.do_open(http.client.HTTPConnection, req) File "C:\Users\21355\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 1345, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [WinError 10060] Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\21355\PycharmProjects\Essa\main.py", line 4, in <module> onto = get_ontology("http://www.semanticweb.org/21355/ontologies/2022/6/untitled-ontology-22").load() File "C:\Users\21355\PycharmProjects\Essa\venv\lib\site-packages\owlready2\namespace.py", line 1028, in load except: raise OwlReadyOntologyParsingError("Cannot download '%s'!" % (url or f)) owlready2.base.OwlReadyOntologyParsingError: Cannot download 'http://www.semanticweb.org/21355/ontologies/2022/6/untitled-ontology-22'! Process finished with exit code 1 |
Administrator
|
Hello,
The error means that Owlready was unable to open the ontology. To load it from a local file, you can : * either use onto_path as you did, and verify that a file "untitled-ontology-22.owl" exists in the path appended to onto_path * or provide a local filename to get_ontology(). Jiba |
Free forum by Nabble | Edit this page |