localGPT
localGPT copied to clipboard
ImportError: cannot import name 'UnstructuredExcelLoader' from 'langchain.document_loaders'
I had things working but after I pulled the new code this morning, when I run imgest.py I get a "ImportError: cannot import name 'UnstructuredExcelLoader' from 'langchain.document_loaders'" message.
@johnkmayo Please try this: The UnstructuredExcelLoader module was removed from one of the earlier versions of the langchain library. Sorry, I don't know which one specifically. If you are using an older version of the library, you will need to upgrade to a newer version in order to use the UnstructuredExcelLoader module.
Not only this error you had come across so far, You may need to carefully run "pip install -r requirements.txt" to update many python libraries to factor in all the changes since your recent pull. Please see that the "requirements.txt" is also changed yesterday.
Here are the steps on how to upgrade to a newer version of the langchain library:
Uninstall the old version of the library: pip uninstall langchain
Install the new version of the library: pip install langchain
Once you have upgraded to a newer version of the library, you should be able to import the UnstructuredExcelLoader module without any errors.
That seems to have fixed that problem. Thanks!
Related on Stack Overflow: ImportError: cannot import name 'UnstructuredExcelLoader' from 'langchain.document_loaders'