Unverified Commit e6ce636e authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

fix nltk lookup (#10585)

parent 9dd054fb
......@@ -52,7 +52,7 @@ logger = logging.getLogger(__name__)
try:
nltk.data.find("tokenizers/punkt")
except LookupError:
except (LookupError, OSError):
if is_offline_mode():
raise LookupError(
"Offline mode: run this script without TRANSFORMERS_OFFLINE first to download nltk data files"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment