Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

RESULT_Limits should be capped at length of full text derivative #58

Open
ianmilligan1 opened this issue May 31, 2019 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ianmilligan1
Copy link
Member

Right now, the default value of RESULT_LIMITS in the full text notebook is 2500.

If you try to use a full-text file with fewer than 2500 records (i.e. less than 2500 lines), it will fail with an opaque error:

---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
<ipython-input-19-747248251276> in <module>()
      1 # Get the set of available years in the collection.
      2 
----> 3 year_range = set([x[0] for x in nb.get_text(TEXT_METHOD)])
      4 print(year_range)

/Users/ianmilligan1/anaconda/lib/python3.5/site-packages/au_notebook.py in get_text(self, by)
    176                             text.append(split_line[3])
    177                 else:
--> 178                     next(fin)
    179         return text
    180 

StopIteration:

It should be the lesser of RESULT_LIMITS or the length of the full text file.

@ianmilligan1 ianmilligan1 added the bug Something isn't working label May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant