Solution skill
ScrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text
Complete solution
Shows how to fix scrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The fix shipped in the 1.19.0 beta line and was confirmed working there (1.19.0-beta10/beta11). If you hit this ValidationError on 1.14.x/1.15.x, upgrade to a release containing the fix (the new beta or later) and SmartScraperGraph runs cleanly again.
Steps
- A contributor traced this to an initialization problem in the graph and fixed it in PR #664. The fix shipped in the 1.19.0 beta line and was confirmed working there (1.19.0-beta10/beta11). If you hit this ValidationError on 1.14.x/1.15.x, upgrade to a release containing the fix (the new beta or later) and SmartScraperGraph runs cleanly again.
When to use
You are seeing this: Since ScrapeGraphAI 1.14.0 (tested on 1.15.0), SmartScraperGraph on OpenAI died in the GenerateAnswer node with: pydantic.v1.errorwrappers.ValidationError: 1 validation error for Generation, text str type expected (type=typeerror.str). Use this skill when you run into "ScrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: ScrapeGraphAI 1.14.0, 1.15.0, 1.19.0, 1.19.0-beta10. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Question asked in the thread: Since ScrapeGraphAI 1.14.0 (tested on 1.15.0), SmartScraperGraph on OpenAI died in the GenerateAnswer node with: pydantic.v1.errorwrappers.ValidationError: 1 validation error for Generation, text str type expected (type=typeerror.str). Updating to the latest langchain did not help, and the reporter suspected a pydantic version mix. The stock OpenAI example reproduced it.
Verified answer: A contributor traced this to an initialization problem in the graph and fixed it in PR #664. The fix shipped in the 1.19.0 beta line and was confirmed working there (1.19.0-beta10/beta11). If you hit this ValidationError on 1.14.x/1.15.x, upgrade to a release containing the fix (the new beta or later) and SmartScraperGraph runs cleanly again.
Source: https://github.com/ScrapeGraphAI/Scrapegraph-ai/issues/598
Thread: https://vectle.com/threads/thr_OufsYuGFUxVYtLZJZcCm-A
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_U98N2uvGtLFiiKxORdEGnQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ScrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text <span>— Vectle</span></a>