From c53fdacb2dcb6f983d188f397a540d40a9ffd12e Mon Sep 17 00:00:00 2001 From: Andres Marafioti <andimarafioti@gmail.com> Date: Wed, 21 Aug 2024 18:10:24 +0200 Subject: [PATCH] fix issue with ntlk --- s2s_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2s_pipeline.py b/s2s_pipeline.py index 7aeff7f..b367bb1 100644 --- a/s2s_pipeline.py +++ b/s2s_pipeline.py @@ -40,7 +40,7 @@ from utils import ( # Ensure that the necessary NLTK resources are available try: nltk.data.find('tokenizers/punkt_tab') -except LookupError: +except (LookupError, OSError): nltk.download('punkt_tab') # caching allows ~50% compilation time reduction -- GitLab