Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Still present in latest version] AttributeError: 'FetchNode' object has no attribute 'update_state' #801

Open
aleenprd opened this issue Nov 15, 2024 · 8 comments

Comments

@aleenprd
Copy link

Describe the bug
I can't even run this example: https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/examples/openai/scrape_plain_text_openai.py

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo and try running the example or any text.
@Levyathanus
Copy link
Contributor

Levyathanus commented Nov 16, 2024

Hello, I've tried to reproduce your problem but I couldn't manage to do it. The issue was solved with this commit: add html source support for source, please try to git pull and update to the latest version.

@VinciGit00
Copy link
Collaborator

thank you @Levyathanus

@FayzulSaimun
Copy link

FayzulSaimun commented Nov 16, 2024

I tired this commit and got the same error.
AttributeError: 'FetchNode' object has no attribute 'update_state'
My code:

graph_config = {
    "llm": {
        "api_key": os.getenv("OPENAI_APIKEY"),
        "model": "openai/gpt-4o",
    },
    "html_mode": True,
    "verbose": True,
    "headless": False,
}

local_html_path = "test.html"
with open(local_html_path, 'r') as file:
    local_html_content = file.read()

smart_scraper_graph = SmartScraperGraph(
    prompt="""Extract the school information as FullName, Short Name, Public address, description, Zip, State, Stree, Phone, Email, Website, and extract all available programs urls. 
        Program urls should be full urls.""",
    source=local_html_content,
    config=graph_config
)

Os: Windows 10

@matheus-rossi
Copy link

Getting the same error here, after upgrading from 1.20.x to 1.30.x

Did you manage to solve it @FayzulSaimun ?

@FayzulSaimun
Copy link

No, Not working, Tried the beta version also. @matheus-rossi

@VinciGit00 VinciGit00 reopened this Nov 18, 2024
@Levyathanus
Copy link
Contributor

Levyathanus commented Nov 18, 2024

Hello, please try to checkout on the precise commit of the fix and re-try first to see if it is an update problem.
You can do that by running: git checkout 5100fbb01746379395a3500eae7eeeb4870be373 or with the latest version on the pre/beta branch.
If it still doesn't work, can u please post the content of your test.html file used in your code?

@matheus-rossi
Copy link

Hello, please try to checkout on the precise commit of the fix and re-try first to see if it is an update problem. You can do that by running: git checkout 5100fbb01746379395a3500eae7eeeb4870be373 or with the latest version on the pre/beta branch. If it still doesn't work, can u please post the content of your test.html file used in your code?

I've tried all versions from v1.29.x and v1.30.x, and in these releases, this fix is not applied.

So, I got the code from that specific commit and manually merged it into my local environment, which fixed the problem.

Basically, the latest versions released do not have this fix, which causes some confusion.

@VinciGit00
Copy link
Collaborator

Hi @matheus-rossi can you please add it and make a pr?

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

No branches or pull requests

5 participants