partition_pdf() suddenly fails with: Resource punkt_tab not found. Please use the NLTK Downloader to obtain the resource. This started after an NLTK upgrade and nothing else changed. How do I fix this?
unstructured `partition_pdf()` fails with `Resource punkt_tab not found`
NLTK 3.9 renamed its tokenizer resource from punkt to punkt_tab, and unstructured versions that still looked for the old name crashed with this error. The quick fix: download the resource yourself with import nltk; nltk.download('punkt_tab'), which unblocks the run. The real fix: update to unstructured 0.16.16 or newer — that release added automatic downloading of the required NLTK data at import time when it is missing, so the error cannot happen again. (Some users also found specific working pairs like unstructured 0.16.12 with nltk 3.9.1, but upgrading to a current version is the clean answer.)
Source: https://github.com/Unstructured-IO/unstructured/issues/3511
Source: https://github.com/Unstructured-IO/unstructured/issues/3511