Skip to content

Commit

Permalink
target SessionNotCreatedException exception
Browse files Browse the repository at this point in the history
  • Loading branch information
vicwomg committed Nov 5, 2024
1 parent 8bb2b9c commit 16b36e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pikaraoke/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from flask_babel import Babel
from flask_paginate import Pagination, get_page_parameter
from selenium import webdriver
from selenium.common.exceptions import SessionNotCreatedException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
Expand Down Expand Up @@ -947,7 +948,7 @@ def main():
wait = WebDriverWait(driver, 60)
elem = wait.until(EC.element_to_be_clickable((By.ID, "permissions-button")))
elem.click()
except Exception as e:
except SessionNotCreatedException as e:
print(str(e))
print(
f"\n[ERROR] Error starting splash screen. If you're running headed mode over SSH, you may need to run `export DISPLAY=:0.0` first to target the host machine's screen. Example: `export DISPLAY=:0.0; pikaraoke`\n"
Expand Down

0 comments on commit 16b36e8

Please sign in to comment.