Open 1272870698 opened 3 weeks ago
which side is this?
Hi can I have reply?
I am having the same issue using a container to run the code. Problem not present in local run
which side is this?
what do you mean side??
Website
I don't think it's relevant. Also watch my issue I just posted
I too am experiencing the same issue with a container. I am currently trying with the python playwright docker image:
# Use Playwright's official Docker image
FROM mcr.microsoft.com/playwright/python:v1.48.0-noble
ARG OPENAI_API_KEY
ENV OPENAI_API_KEY=$OPENAI_API_KEY
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app /app
ENV PYTHONPATH=/app
CMD ["sh", "-c", "export PYTHONPATH=/app && python main.py"]
I have followed the quick install instructions and have tried both headless, and non-headless options, i.e.:
graph_config = {
"llm": {
"api_key": OPENAI_API_KEY,
"model": "openai/gpt-4o-mini",
},
"verbose": True,
"headless": True, # Headless mode for Docker compatibility
}
The below might not fix it, but It looks as though there is an error in the scrapegraphai/docloaders/chromium.py
file--the browser
variable in the finally
block is not guaranteed to be instantiated. It should be instantiated before the try/except/block, assigned a nullish value, e.g. None
and checked with an if block in the finally
block
playwright install :
use :
error :
UnboundLocalError: local variable 'browser' referenced before assignment
detail is :
pelase help me