unstructured icon indicating copy to clipboard operation
unstructured copied to clipboard

Numpy error in 0.12.6

Open virattt opened this issue 1 year ago • 1 comments

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()

virattt avatar Mar 09 '24 16:03 virattt

If this is in colab, then try uninstalling numpy, setuptools and installing it again using the -U arg. Worked for me

adi-kmt avatar Mar 10 '24 06:03 adi-kmt

Recommend following @adi-kmt 's suggestion.

MthwRobinson avatar May 24 '24 14:05 MthwRobinson