Getting below exception while running web scraping script, stuck at installing firefox from snap. Getting apparmor permission issue and tried to reinstall it and still getting the same. please check the error message section.
Dependencies:
Python library: selenium -> added to the cluster
Other dependencies:
Gecko driver installation:
%sh wget https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux-aarch64.t...
%sh tar -xvzf geckodriver-v0.33.0-linux-aarch64.tar.gz
%sh mv geckodriver /tmp
Firefox installation:
%sh /usr/bin/yes | sudo apt update --fix-missing
sudo apt-get --yes --force-yes install firefox
trying to run below sample code in notebook
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
opts = Options()
opts.headless=True
browser = webdriver.Firefox(options=opts, executable_path='/tmp/geckodriver')
browser.get('https://mft.rrc.texas.gov/link/20ff2205-6579-450f-a2ee-cbd37986b557')
error message:
WebDriverException: Message: Process unexpectedly closed with status 1
I did some more research and found the below messages from geckodriver.log
Command '/usr/bin/firefox' requires the firefox snap to be installed. Please install it with: snap install firefox
And when I try to run snap install firefox getting below error.
error: system does not fully support snapd: AppArmor detected but insufficient permissions to use it