Coder Social home page Coder Social logo

Error: Main Exception Message: unknown error: no chrome binary at educative.io_scraper/Chrome-bin/linux/chrome/chrome about educative.io_scraper HOT 9 CLOSED

anilabhadatta avatar anilabhadatta commented on May 27, 2024
Error: Main Exception Message: unknown error: no chrome binary at educative.io_scraper/Chrome-bin/linux/chrome/chrome

from educative.io_scraper.

Comments (9)

anilabhadatta avatar anilabhadatta commented on May 27, 2024

Go to the releases section and download the Chrome-bin for linux and copy and paste the linux folder inside Chrome-bin folder.
The path should be ./educative.io_scraper/Chrome-bin/linux/...
Provide a Screenshot in the future if you are facing any errors.

from educative.io_scraper.

DaveIotDev avatar DaveIotDev commented on May 27, 2024

Thanks, getting the error below after dropping chrome bin.

from educative.io_scraper.

DaveIotDev avatar DaveIotDev commented on May 27, 2024

1 - Copy

from educative.io_scraper.

anilabhadatta avatar anilabhadatta commented on May 27, 2024

@DaveIotDev Please confirm me 5 steps.

  1. Are you running the script from educative_scraper.py?
  2. If yes, then did you start chromedriver manually?
  3. If yes, then restart your system, maybe the previous processes are causing issues with the port.
  4. If not, then go to Chrome-driver/linux/ and open a terminal and load the chromedriver, then execute educative_scraper.py.
  5. Also make sure that you create a virtualenv named "env" - mandatory step.

from educative.io_scraper.

anilabhadatta avatar anilabhadatta commented on May 27, 2024

@DaveIotDev These four steps are important if you want to run from educative_scraper.py
If you want to use the releases, then you can ignore all these steps.
image

Next, you have to load the chromedriver and run educative_scraper.py.
image
image

Enter 1 and provide your config details such as text file path containing URLs, save directory path, headless mode.

Login your account using 2
image

Then press enter on terminal to exit the login screen and enter 3 to start scraping

Note: If you are using multiprocess.py then you don't need to load the chromedriver manually as it is automatically loaded but your Linux OS must have xterm, uxterm or gnome-terminal installed.

from educative.io_scraper.

DaveIotDev avatar DaveIotDev commented on May 27, 2024

Are you running the script from educative_scraper.py? Yes as your ROOT path depends on it.
If yes, then did you start chromedriver manually? Yes
If yes, then restart your system, maybe the previous processes are causing issues with the port. Checked no processes
If not, then go to Chrome-driver/linux/ and open a terminal and load the chromedriver, then execute educative_scraper.py.
Also make sure that you create a virtualenv named "env" - mandatory step. Yup doing this.

So adding below files before headless argument helps.
options.add_argument('--no-sandbox')
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--remote-debugging-port=9515")

Got Rid of the DevToolsActivePort issue,but getting new error now(progress)

Main Exception Message: unknown error: Chrome failed to start: exited abnormally.
(chrome not reachable)

Hopefully you can make those changes and it'll be useful for others.I am pausing this for now.

from educative.io_scraper.

anilabhadatta avatar anilabhadatta commented on May 27, 2024

image
@DaveIotDev fixed a small bug, please update.
I have installed ubuntu and tested the script without any modifications.

from educative.io_scraper.

anilabhadatta avatar anilabhadatta commented on May 27, 2024

@DaveIotDev --remote-debugging-port is not needed and it shouldn't be 9515. The port 9515 is occupied by chromedriver that is used to connect to selenium webdriver via webdriver.Remote('127.0.0.1:9515'). You can provide any other random port numbers as you want.
no-sandbox and dev-svm-usage arguments are already added to code.
I need to clear few things. Did you download the Chrome-bin from the latest release and have you made any changes to chromedriver?
Generally if the chromedriver and chrome version mismatches , error occurs. In the Git repo , I have included v98 chromedriver and chrome-bin so third party chromedrivers may cause issues.
If there is still error then try to give permissions to these files, using sudo chmod +x "file"
I would recommend you to restart the OS and do a git pull to clone the latest commit.

from educative.io_scraper.

anilabhadatta avatar anilabhadatta commented on May 27, 2024

Create a new issue if problem persists.

from educative.io_scraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.