mirror of
https://github.com/open-webui/open-webui
synced 2025-05-25 15:15:28 +00:00
fix: correct incorrect usage of log.exception method
This commit is contained in:
parent
6c4352de07
commit
3e8546135d
@ -227,7 +227,7 @@ class SafeFireCrawlLoader(BaseLoader, RateLimitMixin, URLProcessingMixin):
|
|||||||
yield from loader.lazy_load()
|
yield from loader.lazy_load()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error loading %s", url)
|
log.exception(f"Error loading {url}: {e}")
|
||||||
continue
|
continue
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ class SafeFireCrawlLoader(BaseLoader, RateLimitMixin, URLProcessingMixin):
|
|||||||
yield document
|
yield document
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error loading %s", url)
|
log.exception(f"Error loading {url}: {e}")
|
||||||
continue
|
continue
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ class SafeTavilyLoader(BaseLoader, RateLimitMixin, URLProcessingMixin):
|
|||||||
yield from loader.lazy_load()
|
yield from loader.lazy_load()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error extracting content from URLs")
|
log.exception(f"Error extracting content from URLs: {e}")
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
@ -359,7 +359,7 @@ class SafeTavilyLoader(BaseLoader, RateLimitMixin, URLProcessingMixin):
|
|||||||
yield document
|
yield document
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error loading URLs")
|
log.exception(f"Error loading URLs: {e}")
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ class SafePlaywrightURLLoader(PlaywrightURLLoader, RateLimitMixin, URLProcessing
|
|||||||
yield Document(page_content=text, metadata=metadata)
|
yield Document(page_content=text, metadata=metadata)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error loading %s", url)
|
log.exception(f"Error loading {url}: {e}")
|
||||||
continue
|
continue
|
||||||
raise e
|
raise e
|
||||||
browser.close()
|
browser.close()
|
||||||
@ -471,7 +471,7 @@ class SafePlaywrightURLLoader(PlaywrightURLLoader, RateLimitMixin, URLProcessing
|
|||||||
yield Document(page_content=text, metadata=metadata)
|
yield Document(page_content=text, metadata=metadata)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.continue_on_failure:
|
if self.continue_on_failure:
|
||||||
log.exception(e, "Error loading %s", url)
|
log.exception(f"Error loading {url}: {e}")
|
||||||
continue
|
continue
|
||||||
raise e
|
raise e
|
||||||
await browser.close()
|
await browser.close()
|
||||||
@ -557,7 +557,7 @@ class SafeWebBaseLoader(WebBaseLoader):
|
|||||||
yield Document(page_content=text, metadata=metadata)
|
yield Document(page_content=text, metadata=metadata)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Log the error and continue with the next URL
|
# Log the error and continue with the next URL
|
||||||
log.exception(e, "Error loading %s", path)
|
log.exception(f"Error loading {path}: {e}")
|
||||||
|
|
||||||
async def alazy_load(self) -> AsyncIterator[Document]:
|
async def alazy_load(self) -> AsyncIterator[Document]:
|
||||||
"""Async lazy load text from the url(s) in web_path."""
|
"""Async lazy load text from the url(s) in web_path."""
|
||||||
|
Loading…
Reference in New Issue
Block a user