You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: test1_load_locally (__main__.TestLoadOntologies)
Check if the ontologies in /RDF folder load ok
----------------------------------------------------------------------
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/ontospy/tests/test_load_local.py", line 46, in test1_load_locally
c.describe()
File "/<<PKGBUILDDIR>>/ontospy/core/entities.py", line 387, in describe
self.printStats()
File "/<<PKGBUILDDIR>>/ontospy/core/entities.py", line 377, in printStats
printInfo("Instances....: %d" % self.count())
File "/<<PKGBUILDDIR>>/ontospy/core/entities.py", line 366, in count
return len(self.instances)
TypeError: object of type 'bool' has no len()
I think this is because .instances defaults to False instead of a list.
The method .instances was a quick way to pull out class instances from the class - rather than extracting all of them in advance, which is what is required in order to build documentation pages programmatically.
The recent version 1.9.9.2 provides a more solid way to handle instances i.e. they can be all be extracted and indexed when Ontospy is instantiated (hide_individuals=False) by providing a flag.
I'll reset .instances to return an empty list by default. That should fix it
ontospy 1.9.9.2 fails to build on Debian:
Full build log is at https://buildd.debian.org/status/fetch.php?pkg=ontospy&arch=all&ver=1.9.9.2%7Edfsg-1&stamp=1638035122&raw=0
The text was updated successfully, but these errors were encountered: