undetected-chromedriver icon indicating copy to clipboard operation
undetected-chromedriver copied to clipboard

AttributeError: 'str' object has no attribute '_session'

Open Bits4Bux opened this issue 2 years ago • 1 comments

Hello, I got this error:

Traceback (most recent call last): File "C:\Users\JustAnotherUser\Downloads\Bot\main\SoundCloud.py", line 16, in driver = webdriver.Chrome("C:\Users\JustAnotherUser\Downloads\Bot\main\chromedriver.exe") File "C:\Users\JustAnotherUser\Downloads\Bot\main\undetected_chromedriver_init_.py", line 248, in init options._session = self AttributeError: 'str' object has no attribute '_session'

Process finished with exit code 1

Can anyone help?

Bits4Bux avatar Jul 20 '22 16:07 Bits4Bux

have you tried if __name__ == __main__:

draftmanpenny avatar Aug 30 '22 22:08 draftmanpenny

Having issues with this as well, "have you tried if name == main:" Did not work for me. Please let me know if you figure out a fix :)

jamesr657 avatar Sep 26 '22 10:09 jamesr657

I had the same error and i fixed it with by initializing the options options = webdriver.ChromeOptions() driver = webdriver.Chrome(options=options)

Monir-Nassan avatar Dec 08 '22 01:12 Monir-Nassan