Spaces:
Sleeping
Sleeping
Download utils.py from OrganizedProgrammers/SERPent: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/OrganizedProgrammers/SERPent/resolve/ba2278a5486c42c4aef54f5b424fddf4eacee423/utils.py
- Command line
-
hf download hf://spaces/OrganizedProgrammers/SERPent@ba2278a5486c42c4aef54f5b424fddf4eacee423/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/OrganizedProgrammers/SERPent/resolve/ba2278a5486c42c4aef54f5b424fddf4eacee423/utils.py
388 Bytes
| import logging | |
| from serp import SerpQuery | |
| logger = logging.getLogger(__name__) | |
| def log_gathered_exceptions(results: list, context: str, params: SerpQuery): | |
| """Logs gathered exceptions with context and parameters.""" | |
| for exc, q in zip(results, params.queries): | |
| if isinstance(exc, Exception): | |
| logger.warning(f"Error during {context} for query '{q}': {exc}") | |