leonidessaguisagjr / webdriverdownloader

Python module to facilitate downloading and deploying WebDriver binaries. Currently supporting geckodriver, chromedriver and operachromiumdriver.
https://pypi.org/project/webdriverdownloader/
MIT License
20 stars 17 forks source link

GeckoDriverDownloader get_download_path() error #8

Open AndreVallestero opened 4 years ago

AndreVallestero commented 4 years ago

gdd.get_download_path() File "C:\Program Files\Python37\lib\site-packages\webdriverdownloader\webdriverdownloader.py", line 264, in get_download_path return os.path.join(self.download_root, "gecko", ver) UnboundLocalError: local variable 'ver' referenced before assignment

Unit111 commented 4 years ago

Not sure about this error but if you are trying to get the location of the driver to pass to the Firefox constructor I use a different approach which works: driver_path = GeckoDriverDownloader().download_and_install() print(driver_path[0]) print(GeckoDriverDownloader().get_download_path()) I just pass driver_path. get_download_path() works for me (Windows 10, Python 3.8) but prints something I co not need: C:\Users\\webdriver\gecko\v0.26.0