I'm trying to run a python script (https://github.com/swiss-chris/quora-expander) on Ubuntu 20.04.3, but the terminal returns an error.
My input:
python3 /home/kitezh/quora-expander/quora-expander.py Dima-Vorobiev
The terminal response:
opening https://www.quora.com/profile/Dima-Vorobiev
Traceback (most recent call last):
File "/home/kitezh/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: PosixPath('/home/kitezh/chromedriver')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kitezh/quora-expander/quora-expander.py", line 113, in <module>
browser = connectchrome()
File "/home/kitezh/quora-expander/quora-expander.py", line 20, in connectchrome
browser = webdriver.Chrome(executable_path=driver_path, options=options)
File "/home/kitezh/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/kitezh/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 86, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
How do I fix this? Thank you for your time.
UPD:
Did you do as the message says and "see
sites.google.com/a/chromium.org/chromedriver/home"? What did that say?
That's where I downloaded ChromeDriver 93.0.4577.63 from in the first place.
Also, what is the output of ls -l /home/kitezh/chromedriver?
Here it is:
total 11908
-rwxrwxrwx 1 kitezh kitezh 12192312 Aug 28 02:00 chromedriver
Does that file exist? Is it executable?
When I input chromedriver
, here's the terminal response.
Starting ChromeDriver 93.0.4577.63 (ff5c0da2ec0adeaed5550e6c7e98417dac77d98a-refs/branch-heads/4577@{#1135}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Does package require chrome to be installed? If so when you type
google-chrome at the command line does it startup without any
permission errors?
Yes, the package requires chrome.
Google Chrome launches, but the terminal outputs the following:
[3050:3050:0912/051629.264392:ERROR:viz_main_impl.cc(162)] Exiting GPU process due to errors during initialization
[3113:3113:0912/051629.941247:ERROR:viz_main_impl.cc(162)] Exiting GPU process due to errors during initialization
[3165:3165:0912/051629.979258:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader
[3005:3042:0912/051728.670790:ERROR:persistent_memory_allocator.cc(848)] Corruption detected in shared-memory segment.
@waltinator
Explore your Mount/Read/Write/Execute problems with
https://github.com/waltinator/pathlld, a bash script.
I've run this script, and here are the results.
My input: $ pathlld /usr/bin/chromedriver
The terminal output:
drwxr-xr-x 20 root root 4096 Sep 10 17:53 /
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro)
drwxrwxrwx 14 root root 4096 Aug 19 16:32 /usr
drwxrwxrwx 2 root root 45056 Sep 12 13:48 /usr/bin
-rwxrwxrwx 1 kitezh kitezh 12192312 Aug 28 02:00 /usr/bin/chromedriver