-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug/'isalnum' referenced before assignment #1584
Comments
Hi @nikunjgoel95! if possible, would you mind sharing the document you were working on? |
I experienced the same issue and reported it here: langchain-ai/langchain#11247 |
Yes, I just experienced the same issue. It worked a few days ago, and now it doesn't (no changes' made) |
Having the exact same issue |
here's an error trace -- https://gist.github.com/pchalasani/802c91e897b6433551106ec51942a626 |
I have the same problem as well. |
FYI fix is almost in over here: #1586 |
Fix is merging real soon #1586! Thank you all for reporting the issue! |
@Klaijan Thank you so much for your help! |
It is merged now! |
Upgraded to langchain 0.0.312 but still getting error "An error occurred: cannot access local variable 'isalnum' where it is not associated with a value" when i try to load a pdf using UnstructuredPDFLoader |
Hi @asharda , can you make sure unstructured gets updated as well? |
Describe the bug
if char.isalnum() != isalnum:
UnboundLocalError: local variable 'isalnum' referenced before assignment
To Reproduce
Provide a code snippet that reproduces the issue.
from langchain.document_loaders import UnstructuredPDFLoader
loader = UnstructuredPDFLoader(file_path, mode = "elements", strategy = "hi_res", pdf_infer_table_structure = True, hi_res_model_name = "chipper")
elements = loader.load()
Expected behavior
Expected for the contents of the PDF to load.
Screenshots
Environment Info
Please run
python scripts/collect_env.py
and paste the output here.This will help us understand more about the environment in which the bug occurred.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: