I have limited space on my machine. So, I am running a loop that goes to a website, logs in, follows a link and scrapes data. To limit the space being used, I call a function that closes and quits the webdriver. Then I open a new one, log in again and follow a different link. After 3 or 4 times I get the error when I call the driver.quit().
def close_driver(driver):
driver.close()
driver.quit()
return
I haven't had this issue on my Mac but when I try to run it on IBM bluemix. I get the error:
OSError: [Errno 9] Bad file descriptor