Running Pellet in Google Colab (SOLVED)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Running Pellet in Google Colab (SOLVED)

carlos
This post was updated on .
Hi,

I am using Pellet for inferring new triples in my program, when I was running it locally works properly, but when I tried to execute this in google colab, I get the next failure:




* Owlready2 * Running Pellet...
    java -Xmx2000M -cp ....

CalledProcessError                        Traceback (most recent call last)

/usr/local/lib/python3.6/dist-packages/owlready2/reasoning.py in sync_reasoner_pellet(x, infer_property_values, infer_data_property_values, debug, keep_tmp_file)
    241     try:
--> 242       output = subprocess.run(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE, check = True).stdout
    243     except subprocess.CalledProcessError as e:

4 frames

CalledProcessError: Command '['java', '-Xmx2000M', '-cp', '/usr/local/...


During handling of the above exception, another exception occurred:

OwlReadyJavaError                         Traceback (most recent call last)

/usr/local/lib/python3.6/dist-packages/owlready2/reasoning.py in sync_reasoner_pellet(x, infer_property_values, infer_data_property_values, debug, keep_tmp_file)
    245         raise OwlReadyInconsistentOntologyError()
    246       else:
--> 247         raise OwlReadyJavaError("Java error message is:\n%s" % (e.stderr or e.output or b"").decode("utf8"))
    248
    249     try:

OwlReadyJavaError: Java error message is:
log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.sparql.mgt.ARQMgt).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[line: 822, col: 99] Triple not terminated by DOT: [IRI:http://www.w3.org/2002/07/owl#Ontology]



I do not understand why i cannot use Pellet in google colab. Moreover, When I try to execute Hermit, this works. So, it is a problem just with pellen in google colab. Moreover, the file with all the triples does not have anything wrongs, since it is the same that i use locally and Pellet work well here.

SOLVED:

I do not have done anything, it is porblem of google colab that some times the machines have some wrong things, what you have to do is wait until google colab give you another machine.
Reply | Threaded
Open this post in threaded view
|

Re: Running Pellet in Google Colab (SOLVED)

Bento Dias de Carvalho
Hi,

Can you share your solution? because I have the same error.

Thanks...
Reply | Threaded
Open this post in threaded view
|

Re: Running Pellet in Google Colab (SOLVED)

jayson
Hi together,

I am getting a very similar error not in Colab but using Pycharm.

    raise OwlReadyJavaError("Java error message is:\n%s" % (e.stderr or e.output or b"").decode("utf8"))
owlready2.base.OwlReadyJavaError: Java error message is:
log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.sparql.mgt.ARQMgt).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Unknown concept type: literal(true,(),http://www.w3.org/2001/XMLSchema#boolean)
Use -v for detail.

The path to jdk 12.0.1 is set via

owlready2.JAVA_EXE = "C:\\path\\to\\java.exe"

I Guess it has to do with the literal

Unknown concept type: literal(true,(),http://www.w3.org/2001/XMLSchema#boolean)

Do you have any clue how to fix that?