unclecode/crawl4ai · error · ValueError
Unsupported chunking strategy
Error message
Unsupported chunking strategy
What it means
Error "Unsupported chunking strategy" thrown in unclecode/crawl4ai.
Source
Thrown at crawl4ai/legacy/web_crawler.py:140
self,
url: str,
word_count_threshold=MIN_WORD_THRESHOLD,
extraction_strategy: ExtractionStrategy = None,
chunking_strategy: ChunkingStrategy = RegexChunking(),
bypass_cache: bool = False,
css_selector: str = None,
screenshot: bool = False,
user_agent: str = None,
verbose=True,
**kwargs,
) -> CrawlResult:
try:
extraction_strategy = extraction_strategy or NoExtractionStrategy()
extraction_strategy.verbose = verbose
if not isinstance(extraction_strategy, ExtractionStrategy):
raise ValueError("Unsupported extraction strategy")
if not isinstance(chunking_strategy, ChunkingStrategy):
raise ValueError("Unsupported chunking strategy")
word_count_threshold = max(word_count_threshold, MIN_WORD_THRESHOLD)
cached = None
screenshot_data = None
extracted_content = None
if not bypass_cache and not self.always_by_pass_cache:
cached = get_cached_url(url)
if kwargs.get("warmup", True) and not self.ready:
return None
if cached:
html = sanitize_input_encode(cached[1])
extracted_content = sanitize_input_encode(cached[4])
if screenshot:
screenshot_data = cached[9]
if not screenshot_data:View on GitHub (pinned to 7e80152142)
Solutions
- Use a supported chunking strategy such as RegexChunking or SlidingWindowChunking.
- Pass a ChunkingStrategy instance to the crawler call.
Example fix
crawler.run(url, chunking_strategy=RegexChunking())
When it happens
Trigger: Thrown at crawl4ai/legacy/web_crawler.py:140 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of unclecode/crawl4ai@7e80152142 (2026-08-14).
Data as JSON: /api/errors/d062957d039230d7.
Report an issue: GitHub.