You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
geckodriver_autoinstaller.install()
/usr/local/lib/python3.9/site-packages/geckodriver_autoinstaller/__init__.py:15: in install
geckodriver_filepath = utils.download_geckodriver(cwd)
/usr/local/lib/python3.9/site-packages/geckodriver_autoinstaller/utils.py:148: in download_geckodriver
firefox_version = get_firefox_version()
/usr/local/lib/python3.9/site-packages/geckodriver_autoinstaller/utils.py:91: in get_firefox_version
process = subprocess.Popen(['/Applications/Firefox.app/Contents/MacOS/firefox', '--version'], stdout=subprocess.PIPE)
/usr/local/Cellar/[email protected]/3.9.2_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:951: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
/usr/local/Cellar/[email protected]/3.9.2_4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py:1823: in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: '/Applications/Firefox.app/Contents/MacOS/firefox'
I made a tiny change, so it won't error out.
--- a/geckodriver_autoinstaller/utils.py
+++ b/geckodriver_autoinstaller/utils.py
@@ -95,8 +95,12 @@ def get_firefox_version():
with subprocess.Popen(['firefox', '--version'], stdout=subprocess.PIPE) as proc:
version = proc.stdout.read().decode('utf-8').replace('Mozilla Firefox', '').strip()
elif platform == 'mac':
- process = subprocess.Popen(['/Applications/Firefox.app/Contents/MacOS/firefox', '--version'], stdout=subprocess.PIPE)
- version = process.communicate()[0].decode('UTF-8').replace('Mozilla Firefox', '').strip()
+ ff_path = '/Applications/Firefox.app/Contents/MacOS/firefox'
+ if os.path.exists(ff_path):
+ process = subprocess.Popen([ff_path, '--version'], stdout=subprocess.PIPE)
+ version = process.communicate()[0].decode('UTF-8').replace('Mozilla Firefox', '').strip()
+ else:
+ return
elif platform == 'win':
path1 = 'C:\\PROGRA~1\\Mozilla Firefox\\firefox.exe'
path2 = 'C:\\PROGRA~2\\Mozilla Firefox\\firefox.exe'
Error seen:
I made a tiny change, so it won't error out.
Please take a look. Thank you. @yeongbin-jo
The text was updated successfully, but these errors were encountered: