community[patch]: GCSDirectoryLoader bugfix (#20005)

- **Description:** Bug fix. Removed extra line in `GCSDirectoryLoader`
to allow catching Exceptions. Now also logs the file path if Exception
is raised for easier debugging.
- **Issue:** #20198 Bug since langchain-community==0.0.31
- **Dependencies:** No change
- **Twitter handle:** timothywong731

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
pull/19284/head
Timothy 2 months ago committed by GitHub
parent ac42e96e4c
commit 0c848a25ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,10 +65,6 @@ class GCSDirectoryLoader(BaseLoader):
# intermediate directories on the fly
if blob.name.endswith("/"):
continue
loader = GCSFileLoader(
self.project_name, self.bucket, blob.name, loader_func=self._loader_func
)
docs.extend(loader.load())
# Use the try-except block here
try:
loader = GCSFileLoader(

Loading…
Cancel
Save