-
Notifications
You must be signed in to change notification settings - Fork 4
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
Infinite loop in NautilusCTSResolver.inventory #85
Comments
Yes, this is kind of a "known" bug: if you have nothing in your corpus, it breaks Nautilus. I'd need to have a look into that |
Thanks for taking a look! In my actual repo, there is something there, of course, but perhaps none of them are loaded due to other validation problems. |
Can you check if the issue is in the DTS branch ? |
I...am not sure. With the Traceback (most recent call last):
File "test.py", line 6, in <module>
resolver.parse()
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 125, in parse
self._parse(resource)
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 134, in _parse
return super(ProtoNautilusCtsResolver, self).parse(resource=resource)
File "/home/giles/cdli/Nautilus/MyCapytain/build/lib/MyCapytain/resolvers/cts/local.py", line 312, in parse
return self.inventory
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 294, in inventory
self.__inventory__ = self.get_or(self.inventory_cache_key, self.parse, self.__resources__)
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 90, in get_or
raise E
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 80, in get_or
output = callback(*args, **kwargs)
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 125, in parse
self._parse(resource)
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 134, in _parse
return super(ProtoNautilusCtsResolver, self).parse(resource=resource)
File "/home/giles/cdli/Nautilus/MyCapytain/build/lib/MyCapytain/resolvers/cts/local.py", line 306, in parse
self._dispatch_container(textgroup, textgroup_path)
File "/home/giles/cdli/Nautilus/capitains_nautilus/cts/resolver/base.py", line 157, in _dispatch_container
super(ProtoNautilusCtsResolver, self)._dispatch_container(textgroup, directory)
File "/home/giles/cdli/Nautilus/MyCapytain/build/lib/MyCapytain/resolvers/cts/local.py", line 262, in _dispatch_container
self._dispatch(textgroup, directory)
File "/home/giles/cdli/Nautilus/MyCapytain/build/lib/MyCapytain/resolvers/cts/local.py", line 246, in _dispatch
self.dispatcher.dispatch(textgroup, path=directory)
File "/home/giles/cdli/Nautilus/MyCapytain/build/lib/MyCapytain/resolvers/utils.py", line 80, in dispatch
collection.parent = self.collection.children[inventory]
KeyError: 'default' But after switching to a |
Steps to reproduce, in case there's some build step I'm missing: $ git clone https://github.com/Capitains/Nautilus
$ cd Nautilus
$ git checkout dts-draft-1
$ git clone https://github.com/Capitains/MyCapytain
$ pipenv install werkzeug typing linkheader six lxml future rdflib-jsonld pyld typing rdflib-sqlalchemy
$ PYTHONPATH=$PWD/MyCapytain pipenv run python << END
from capitains_nautilus.cts.resolver import NautilusCtsResolver
resolver = NautilusCtsResolver(['/dev/null'])
resolver.parse()
END
[...]
RecursionError: maximum recursion depth exceeded while calling a Python object |
Trying to reproduce this morning |
Oh, I thought the reproduction contained your corpora.... I actually know of this bug, never took care of it.... |
Well, it reproduces with an empty corpus, but the same problem occurs if no works in the corpus validate. :) |
Testing a new corpus I ran into an infinite loop in the resolver. I wrote a simple testcase if that's helpful.
The text was updated successfully, but these errors were encountered: