Replies: 2 comments
-
I began experiencing the same issue after updating unstructured_inference from version 0.7.36 to 0.7.37. However, everything worked as expected once I downgraded to the previous version. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The general topic is not for debugging |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
langchain 0.3 and python-3.11.5
if use loader =UnstructuredPDFLoader(fileName) or loader = UnstructuredImageLoader(fileName) ,will to occur under error:
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\langchain_core\document_loaders\base.py", line 31, in load
return list(self.lazy_load())
^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\langchain_community\document_loaders\unstructured.py", line 107, in lazy_load
elements = self._get_elements()
^^^^^^^^^^^^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\langchain_community\document_loaders\pdf.py", line 72, in _get_elements
from unstructured.partition.pdf import partition_pdf
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\unstructured\partition\pdf.py", line 56, in
from unstructured.partition.pdf_image.analysis.layout_dump import (
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\unstructured\partition\pdf_image\analysis\layout_dump.py", line 7, in
from unstructured_inference.inference.elements import ImageTextRegion, TextRegion
File "D:\Python\anaconda3\envs\python2\Lib\site-packages\unstructured_inference\inference\elements.py", line 209, in
@DataClass
^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\dataclasses.py", line 1230, in dataclass
return wrap(cls)
^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\dataclasses.py", line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\anaconda3\envs\python2\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'numpy.ndarray'> for field texts is not allowed: use default_factory
Beta Was this translation helpful? Give feedback.
All reactions