Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Selenium Webdriver(Python): Firefox gives Permission denied: 'geckodriver.log'

  • 06-10-2020 08:19PM
    #1
    Registered Users, Registered Users 2 Posts: 5,758 ✭✭✭


    So i keep getting this permissions error when initialising. Sounds simple enough, no permission to write wherever the directory is for the log.
     log_file = open(log_path, "a+") if log_path is not None and log_path != "" else None
    PermissionError: [Errno 13] Permission denied: 'geckodriver.log'
    

    So i tried doing chmod 777 on the directory and specifying it, hardcoding below at initializing stage

    if browser == 'firefox':
            return webdriver.Firefox(
                executable_FIREFOXDRIVER_PATH,
                log_path='./geckodriver.log')
    

    But still i get the error. Anyone seen before?


Comments

  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Need permission on parent folders as well, at least +x on all.


Advertisement