Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: cannot access local variable 'browser' where it is not associated with a value #78

Open
TomerGamerTV opened this issue Jun 2, 2023 · 5 comments

Comments

@TomerGamerTV
Copy link

The program worked fine but like 2 days ago i started getting this error:

cannot access local variable 'browser' where it is not associated with a value

Traceback (most recent call last):
  File "app.py", line 59, in get_driver
  File "undetected_chromedriver\__init__.py", line 441, in __init__
  File "selenium\webdriver\chrome\webdriver.py", line 84, in __init__
  File "selenium\webdriver\chromium\webdriver.py", line 104, in __init__
  File "selenium\webdriver\remote\webdriver.py", line 286, in __init__
  File "undetected_chromedriver\__init__.py", line 704, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 378, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 440, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 245, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:27127
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 113.0.5672.129
Stacktrace:
Backtrace:
	GetHandleVerifier [0x004DA813+48355]
	(No symbol) [0x0046C4B1]
	(No symbol) [0x00375358]
	(No symbol) [0x003961AC]
	(No symbol) [0x003906B4]
	(No symbol) [0x00390491]
	(No symbol) [0x003C0C55]
	(No symbol) [0x003C093C]
	(No symbol) [0x003BA536]
	(No symbol) [0x003982DC]
	(No symbol) [0x003993DD]
	GetHandleVerifier [0x0073AABD+2539405]
	GetHandleVerifier [0x0077A78F+2800735]
	GetHandleVerifier [0x0077456C+2775612]
	GetHandleVerifier [0x005651E0+616112]
	(No symbol) [0x00475F8C]
	(No symbol) [0x00472328]
	(No symbol) [0x0047240B]
	(No symbol) [0x00464FF7]
	BaseThreadInitThunk [0x755C7D59+25]
	RtlInitializeExceptionChain [0x7742B74B+107]
	RtlClearBits [0x7742B6CF+191]


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 343, in bootstrap
  File "app.py", line 171, in start_chrome
  File "app.py", line 108, in get_driver
UnboundLocalError: cannot access local variable 'browser' where it is not associated with a value

@ucarno
Copy link
Owner

ucarno commented Jun 2, 2023

Update your chrome by going to chrome://settings/help, then start bot as usual

@ucarno ucarno changed the title Error with ChromeDriver UnboundLocalError: cannot access local variable 'browser' where it is not associated with a value Jun 6, 2023
@Kureka
Copy link

Kureka commented Aug 18, 2023

cannot access local variable 'browser' where it is not associated with a value

Traceback (most recent call last):
  File "app.py", line 59, in get_driver
  File "undetected_chromedriver\__init__.py", line 441, in __init__
  File "selenium\webdriver\chrome\webdriver.py", line 84, in __init__
  File "selenium\webdriver\chromium\webdriver.py", line 104, in __init__
  File "selenium\webdriver\remote\webdriver.py", line 286, in __init__
  File "undetected_chromedriver\__init__.py", line 704, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 378, in start_session
  File "selenium\webdriver\remote\webdriver.py", line 440, in execute
  File "selenium\webdriver\remote\errorhandler.py", line 245, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:60172
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97
Stacktrace:
Backtrace:
        GetHandleVerifier [0x00A7A813+48355]
        (No symbol) [0x00A0C4B1]
        (No symbol) [0x00915358]
        (No symbol) [0x009361AC]
        (No symbol) [0x009306B4]
        (No symbol) [0x00930491]
        (No symbol) [0x00960C55]
        (No symbol) [0x0096093C]
        (No symbol) [0x0095A536]
        (No symbol) [0x009382DC]
        (No symbol) [0x009393DD]
        GetHandleVerifier [0x00CDAABD+2539405]
        GetHandleVerifier [0x00D1A78F+2800735]
        GetHandleVerifier [0x00D1456C+2775612]
        GetHandleVerifier [0x00B051E0+616112]
        (No symbol) [0x00A15F8C]
        (No symbol) [0x00A12328]
        (No symbol) [0x00A1240B]
        (No symbol) [0x00A04FF7]
        BaseThreadInitThunk [0x75277D59+25]
        RtlInitializeExceptionChain [0x76EDB79B+107]
        RtlClearBits [0x76EDB71F+191]


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 359, in bootstrap
  File "app.py", line 169, in start_chrome
  File "app.py", line 108, in get_driver
UnboundLocalError: cannot access local variable 'browser' where it is not associated with a value

[2023-08-18 07:59:45,137 - ERROR] (Oops)

Something unexpected happened!

I got error with latest chrome version

Chrome is up to date
Version 116.0.5845.97 (Official Build) (64-bit)

@omarsaad98
Copy link

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:61215
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.96

updating selenium should fix this issue

@Kureka
Copy link

Kureka commented Aug 26, 2023

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:61215
from session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.96

updating selenium should fix this issue

How to do that? Probably you can give tutorial to manually updating it.

@omarsaad98
Copy link

How to do that? Probably you can give tutorial to manually updating it.

It was mainly a comment to the developers, but here's the suggested temporary fix posted on the discord server:

Ok here is how i got it to work on Windows. Go to this sourceforge page. Download the newest v114 "portable" chrome (portableapps.com makes various apps in portable versions, including chrome):
https://sourceforge.net/projects/portableapps/files/Google%20Chrome%20Portable/

114.0.5735.199 direct link:
https://sourceforge.net/projects/portableapps/files/Google%20Chrome%20Portable/GoogleChromePortable64_114.0.5735.199_online.paf.exe/download

Download the exe and run it. Run through the wizard - It will download and extract a portable chrome version to a folder.

Modify config.json in the OW token script folder to point to where you saved the chrome portable exe. Note: if you copy/paste the EXE paths from windows explorer you will have to change all the slashes in the path to "forward slashes" i.e. /

make sure it points to the chrome.exe in the chrome-bin folder. then save the json

Then it should launch if you run the OW token script

1144257211892252702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants