Hi there! when i apply screenshot in a task with chromedriver, i get usually the next error, but when i run from bash it runs always normal. Someone know how to fix it?
Traceback (most recent call last):
File "/home/clau2020/scraping_bi.py", line 42, in <module>
driver.save_screenshot(name)
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 1055, in save_screenshot
return self.get_screenshot_as_file(filename)
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 1032, in get_screenshot_as_file
png = self.get_screenshot_as_png()
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 1064, in get_screenshot_as_png
return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 1074, in get_screenshot_as_base64
return self.execute(Command.SCREENSHOT)['value']
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/clau2020/.virtualenvs/andy_campa/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
from tab crashed
(Session info: headless chrome=78.0.3904.70)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
[edited by admin: formatting]