I think what's occurring is that since we're spinning up multiple threads here, we're calling split_by_sentence_tokenizer within the lifespan method multiple times which are getting executed simultaneously. This seems to lead to a race condition where if one finishes before the other method calls, the other method calls raise a FileExistsError complaining that the file already exists. This shouldn't be a big problem given that we've actually downloaded the file that is being used internally by NLTK.
Fix for issue mentioned here.
I think what's occurring is that since we're spinning up multiple threads here, we're calling
split_by_sentence_tokenizer
within thelifespan
method multiple times which are getting executed simultaneously. This seems to lead to a race condition where if one finishes before the other method calls, the other method calls raise aFileExistsError
complaining that the file already exists. This shouldn't be a big problem given that we've actually downloaded the file that is being used internally by NLTK.