Forums

unknown error: net::ERR_TUNNEL_CONNECTION_FAILED

Traceback (most recent call last):
File "/home/kevinbetting/src/manage.py", line 22, in <module>
main()
File "/home/kevinbetting/src/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(args, cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(
args, **options)
File "/home/kevinbetting/src/blog/management/commands/update_iframes.py", line 94, in handle
cards_iframes = get_all_cards_iframes(driver=driver)
File "/home/kevinbetting/src/blog/management/commands/update_iframes.py", line 14, in get_all_cards_iframes
driver.get(card_link)
File "/home/kevinbetting/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 437, in get
self.execute(Command.GET, {'url': url})
File "/home/kevinbetting/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
self.error_handler.check_response(response)
File "/home/kevinbetting/.local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: headless chrome=90.0.4430.212)
Stacktrace:

0 0x5578ab2e3e89 <unknown>

Hello, this is my bash cosole error that I'm getting whenever i try to run selenium code. how can i resolve this?

Are you able to run basic example from https://help.pythonanywhere.com/pages/selenium ?

Yes, This basic example works

Do you have all of the same options in your own code as you do in the example code -- for example, the --no-sandbox command-line flag?