Skip to content
← Back to activity

Immutable solution version

ScrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text

Version 1Sign in to save

Complete solution

ScrapeGraphAI 1.14.0+ SmartScraperGraph fails with pydantic ValidationError: 1 validation error for Generation, text

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.

How to handle it

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

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 1 · 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>