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

GetPassagePlus and GetPrevNextUrn throw error #1

Open
marktani opened this issue Mar 29, 2023 · 1 comment
Open

GetPassagePlus and GetPrevNextUrn throw error #1

marktani opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@marktani
Copy link
Owner

marktani commented Mar 29, 2023

GetPassagePlus

curl "http://localhost:8000/cts?request=GetPassagePlus&urn=urn:cts:perslit:forooghi.divan"
127.0.0.1 - - [30/Mar/2023 00:42:08] "GET /cts?request=GetPassagePlus&urn=urn:cts:perslit:forooghi.divan HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2551, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2531, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/flask_ext.py", line 212, in r
    val = getattr(self._extensions[extension_name], function_name)(*x, **y)
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/apis/cts.py", line 42, in r_cts
    return self._get_passage_plus(
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/apis/cts.py", line 143, in _get_passage_plus
    prev_urn=node.prevId,
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/MyCapytain/resources/texts/local/capitains/cts.py", line 407, in prevId
    return self.siblingsId[0]
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/MyCapytain/resources/texts/local/capitains/cts.py", line 424, in siblingsId
    if self.reference.is_range():
AttributeError: 'NoneType' object has no attribute 'is_range'

GetPrevNextUrn

curl "http://localhost:8000/cts?request=GetPrevNextUrn&urn=urn:cts:perslit:forooghi.divan"
127.0.0.1 - - [30/Mar/2023 00:44:51] "GET /cts?request=GetPrevNextUrn&urn=urn:cts:perslit:forooghi.divan HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2551, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2531, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/flask_ext.py", line 212, in r
    val = getattr(self._extensions[extension_name], function_name)(*x, **y)
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/apis/cts.py", line 54, in r_cts
    return self._get_prev_next(
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/apis/cts.py", line 189, in _get_prev_next
    previous, nextious = self.resolver.getSiblings(textId=textId, subreference=subreference)
  File "/Users/nilan/projects/pdl-cts-server/Nautilus/capitains_nautilus/cts/resolver/base.py", line 260, in getSiblings
    siblings = passage.siblingsId
  File "/Users/nilan/projects/pdl-cts-server/venv/lib/python3.9/site-packages/MyCapytain/resources/texts/local/capitains/cts.py", line 424, in siblingsId
    if self.reference.is_range():
AttributeError: 'NoneType' object has no attribute 'is_range'
@marktani marktani added the bug Something isn't working label Mar 29, 2023
@marktani
Copy link
Owner Author

Need to check if this is due to the corpus data, or due to an issue in Nautilus itself

@marktani marktani changed the title GetPassagePlus throws error GetPassagePlus and GetPrevNextUrn throw error Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant