Skip to content

[πŸ› Bug]: [py] --user-data-dir requires a non-default directoryΒ #16274

@azim218

Description

@azim218
Image Image
  1. what I wanted to happen
  2. what happened

Description

  1. I was trying to open a website with selenium
  2. I excpected it to open
  3. It launched the right chrome profile, but did nothing else
 DevTools remote debugging requires a non-default data directory. Specify this using --user-data-dir.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1756494378.641163   15748 voice_transcription.cc:58] Registering VoiceTranscriptionCapability
Created TensorFlow Lite XNNPACK delegate for CPU.
Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#-1 is a dynamic-sized tensor).
[11032:15816:0829/220618.694:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT
  1. the code
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options


chromedriver_path = r"C:\Users\emila\Downloads\chromedriver.exe"


options = Options()
options.add_argument(r"user-data-dir=C:\Users\emila\AppData\Local\Google\Chrome\User Data")
options.add_argument("profile-directory=Profile 1")


service = Service(executable_path=chromedriver_path)
driver = webdriver.Chrome(service=service, options=options)


driver.get("https://www.example.com")

Reproducible Code

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options


chromedriver_path = r"C:\Users\emila\Downloads\chromedriver.exe"


options = Options()
options.add_argument(r"user-data-dir=C:\Users\emila\AppData\Local\Google\Chrome\User Data")
options.add_argument("profile-directory=Profile 1")


service = Service(executable_path=chromedriver_path)
driver = webdriver.Chrome(service=service, options=options)


driver.get("https://www.example.com")

Debugging Logs

DevTools remote debugging requires a non-default data directory. Specify this using --user-data-dir.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1756494378.641163   15748 voice_transcription.cc:58] Registering VoiceTranscriptionCapability
Created TensorFlow Lite XNNPACK delegate for CPU.
Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#-1 is a dynamic-sized tensor).
[11032:15816:0829/220618.694:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions