unstructured
unstructured copied to clipboard
Numpy error in 0.12.6
Describe the bug Getting an error when using unstructured + langchain. Only happens in 0.12.6. Cannot repro in 0.12.5.
The error:
55 IS_PYSTON = hasattr(sys, "pyston_version_info")
56 HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
---> 57 HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64
58
59 _OLD_PROMOTION = lambda: np._get_promotion_state() == 'legacy'
AttributeError: module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'
To Reproduce
from langchain_community.document_loaders import UnstructuredURLLoader
url = "https://www.sec.gov/Archives/edgar/data/0001559720/000155972023000020/abnb-20230930.htm"
loader = UnstructuredURLLoader(urls=[url], headers={'User-Agent': 'user-agent [email protected]'})
documents = loader.load()
If this is in colab, then try uninstalling numpy, setuptools and installing it again using the -U arg. Worked for me
Recommend following @adi-kmt 's suggestion.