## The problem

UnboundLocalError: local variable 'isalnum' referenced before assignment, from `if char.isalnum() != isalnum`. Reproduced via langchain's UnstructuredPDFLoader.

## The fix

UnboundLocalError: local variable 'isalnum' referenced before assignment from UnstructuredPDFLoader: your unstructured install is stale. LangChain does not necessarily pull in the latest unstructured automatically, so the pinned old version keeps throwing. Fix: upgrade unstructured to 0.10.21 or later (verify with pip freeze). Commenter-verified.