From aa58f3932b300c7ea5fcdcd15e7baf5b09d8d2b1 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 29 Nov 2019 09:12:57 +1100 Subject: [PATCH] Use hardcoded path for driver executable --- spectur_live_view.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spectur_live_view.py b/spectur_live_view.py index e0e1dd1..46e2728 100644 --- a/spectur_live_view.py +++ b/spectur_live_view.py @@ -4,7 +4,6 @@ Open an automated selenium webdriver, and download images from Live View mode. """ import os -import sys import glob import time import pytz @@ -54,7 +53,8 @@ def start_session(): # Start webdriver options = Options() options.headless = True - driver = webdriver.Firefox(options=options) + executable_path = os.path.join(pwd, 'geockdriver') + driver = webdriver.Firefox(executable_path=executable_path, options=options) return driver @@ -257,9 +257,6 @@ def get_brightness(jpg_name, mask): # Create counter t = [] -# Add current folder to system path so browser drive can be found -sys.path.insert(0, pwd) - # Open browser get_images()