Skip to content

fix: prevent TypeError when verbose=True passed to arun()#1984

Open
kaixinhuzhu558-cyber wants to merge 1 commit into
unclecode:mainfrom
kaixinhuzhu558-cyber:fix/verbose-param-conflict
Open

fix: prevent TypeError when verbose=True passed to arun()#1984
kaixinhuzhu558-cyber wants to merge 1 commit into
unclecode:mainfrom
kaixinhuzhu558-cyber:fix/verbose-param-conflict

Conversation

@kaixinhuzhu558-cyber
Copy link
Copy Markdown

Description

When calling \�run(url, verbose=True), Crawl4AI raises \TypeError: unexpected keyword argument 'verbose'\ because \�erbose\ is consumed by \CrawlerRunConfig\ but still forwarded through **kwargs.

Fix

Added \kwargs.pop('verbose', None)\ after line 254 in \�sync_webcrawler.py\ to safely consume the parameter before it reaches the downstream method.

Test

Added \ ests/test_verbose_bug.py\ that verifies \�run(url, verbose=True)\ no longer raises TypeError.

When calling arun(url, verbose=True), Crawl4AI raises TypeError
because 'verbose' is consumed by CrawlerRunConfig but still forwarded
through **kwargs.

Added kwargs.pop('verbose', None) to safely consume the parameter
before it reaches the downstream method.

Added tests/test_verbose_bug.py to verify no TypeError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant