Closed nicholasadamou closed 1 month ago
platform: linux/amd64
in the docker-compose.yml
file.Dockerfile
to include steps to install Google Chrome with compatibility for linux/amd64
.Here’s an example of the required changes:
docker-compose.yml
services:
chatgpt-scraper:
build: .
platform: linux/amd64
volumes:
- ./scripts/entrypoint.sh:/usr/src/app/entrypoint.sh
env_file:
- .env
entrypoint: ["/usr/src/app/entrypoint.sh"]
Dockerfile
RUN apt-get update && \
apt-get install -y \
build-essential \
curl \
wget \
gnupg && \
# Download and install Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
rm google-chrome-stable_current_amd64.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
These changes should allow the script to run correctly under Rosetta 2 emulation on Apple Silicon.
Description
When attempting to run the
chatgpt-scraper
project using Docker Compose, the following error occurs:Steps to Reproduce
Run the following command in the terminal:
The container initializes, but the script fails with the
TypeError: Binary Location Must be a String
.Expected Behavior
The script should initialize a browser session and interact with ChatGPT using predefined prompts without throwing an error.
Actual Behavior
The script throws a
TypeError
indicating that thebinary_location
in the Selenium WebDriver options must be a string, which leads to the failure of the script.Possible Causes
undetected_chromedriver
library is setting thebinary_location
.undetected_chromedriver
to incorrectly handle the binary path.Environment
Additional Information
binary_location
is either not being set correctly or is being set to a non-string value (such asNone
).Related
The issue found at undetected-chromedriver/issues/1927 suggest that this is a known issue currently with
undetected-chromedriver
v3.5.5.