Describe the bug
The cognee-community-tasks-scrapegraph package is not compatible with the latest scrapegraph-py (v2.1.0).
When importing scrape_urls from cognee_community_tasks_scrapegraph, the import fails with:
ImportError: cannot import name 'Client' from 'scrapegraph_py'
The package appears to expect the older scrapegraph-py API (Client), while the latest SDK (v2.1.0) no longer exposes that class.
To Reproduce
-
Create a new Python virtual environment.
-
Install:
pip install cognee-community-tasks-scrapegraph scrapegraph-py
-
Create a simple script:
import asyncio
import os
from cognee_community_tasks_scrapegraph import scrape_urls
os.environ["SGAI_API_KEY"] = "your-api-key"
async def main():
results = await scrape_urls(
urls=[
"https://cognee.ai",
"https://docs.cognee.ai",
],
prompt="Extract the product description, key features, and target use cases",
)
print(results)
asyncio.run(main())
-
Run the script.
Actual behavior
The script fails during import with:
ImportError: cannot import name 'Client' from 'scrapegraph_py'
Traceback points to:
from scrapegraph_py import Client
inside cognee_community_tasks_scrapegraph/scrapegraph_task.py.
Expected behavior
The package should either:
- support the latest
scrapegraph-py SDK (v2.x), or
- specify a compatible version constraint (for example, pinning
scrapegraph-py<2 if only the older API is supported).
Screenshots
Desktop
- OS: Ubuntu 24.04 LTS
- Python: 3.12
cognee-community-tasks-scrapegraph: 0.1.1
scrapegraph-py: 2.1.0
Smartphone
Not applicable.
Additional context
Installed package versions:
cognee-community-tasks-scrapegraph==0.1.1
scrapegraph-py==2.1.0
It appears that scrapegraph_task.py still imports:
from scrapegraph_py import Client
However, Client is no longer available in scrapegraph-py v2.x, resulting in an immediate ImportError before any user code can execute.
Describe the bug
The
cognee-community-tasks-scrapegraphpackage is not compatible with the latestscrapegraph-py(v2.1.0).When importing
scrape_urlsfromcognee_community_tasks_scrapegraph, the import fails with:The package appears to expect the older
scrapegraph-pyAPI (Client), while the latest SDK (v2.1.0) no longer exposes that class.To Reproduce
Create a new Python virtual environment.
Install:
Create a simple script:
Run the script.
Actual behavior
The script fails during import with:
Traceback points to:
inside
cognee_community_tasks_scrapegraph/scrapegraph_task.py.Expected behavior
The package should either:
scrapegraph-pySDK (v2.x), orscrapegraph-py<2if only the older API is supported).Screenshots
Desktop
cognee-community-tasks-scrapegraph: 0.1.1scrapegraph-py: 2.1.0Smartphone
Not applicable.
Additional context
Installed package versions:
It appears that
scrapegraph_task.pystill imports:However,
Clientis no longer available inscrapegraph-pyv2.x, resulting in an immediateImportErrorbefore any user code can execute.