Skip to content

add error handling for crawl4ai markdown generator#33

Open
RulinShao wants to merge 2 commits intomainfrom
fix-web-browsing-markdown-parser
Open

add error handling for crawl4ai markdown generator#33
RulinShao wants to merge 2 commits intomainfrom
fix-web-browsing-markdown-parser

Conversation

@RulinShao
Copy link
Collaborator

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move the block list to agent/utils/crawl4ai_block_list.txt‎ and soft link it here in the rl repo (to make it compatible with the original repo)?

physicsworld.com
wiley.com
hindawi.com
jhu.edu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok randomly saw this -- there is a bunch of .edu domain names removed here -- I think this is list is obtained for crawling for pretraining data, but not sure if it is ideal to exclude them here.

error_str = str(e)
# Check if it's a 500 error related to markdown_generator serialization
if "500" in error_str or "model_dump" in error_str:
print(f"[crawl4ai] markdown_generator caused error, retrying without it: {error_str[:100]}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if removing markdown generator can actually avoid this issue? (b/c sometimes it's just b/c downloading the original webpage may take a bit longer and then retrying it again after a few seconds can actually fix the issue) But maybe there are outliers?

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.

3 participants