[GH-ISSUE #156] [WhoScored] Enable setting ChomeDriver version manually #37

Open
opened 2026-03-02 15:55:14 +03:00 by kerem · 1 comment
Owner

Originally created by @jerem1e on GitHub (Feb 3, 2023).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/156

I have just tried using the library on an older machine and Chrome was a bit outdated, which caused the library to raise:

     The ChromeDriver was unable to initiate/spawn a new                                                                                                                                                                                                          
     WebBrowser. You will not be able to scrape new data.                                                                                                                                                                                                         
     Message: unknown error: cannot connect to chrome at 127.0.0.1:57261                                                                                                                                                                                          
     from session not created: This version of ChromeDriver only supports Chrome version 109                                                                                                                                                                                      
     Current browser version is 108.0.5359.124

This can easily be fixed, by allowing to add version_main to the undetected_chromedriver.ChromeDriver.
For me I had to change the line 412 in _common.py to:

return uc.Chrome(options=chrome_options, version_main=108) # 108, because that's the main version of the installed chrome browser

But it would be great to have the user set this when initializing the WhoScored object or any other object that needs a Chrome-driver (but I think this is only relevant for WhoScored?)

Originally created by @jerem1e on GitHub (Feb 3, 2023). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/156 I have just tried using the library on an older machine and Chrome was a bit outdated, which caused the library to raise: ```python The ChromeDriver was unable to initiate/spawn a new WebBrowser. You will not be able to scrape new data. Message: unknown error: cannot connect to chrome at 127.0.0.1:57261 from session not created: This version of ChromeDriver only supports Chrome version 109 Current browser version is 108.0.5359.124 ``` This can easily be fixed, by allowing to add `version_main` to the `undetected_chromedriver.ChromeDriver`. For me I had to change the line 412 in `_common.py` to: ```python return uc.Chrome(options=chrome_options, version_main=108) # 108, because that's the main version of the installed chrome browser ``` But it would be great to have the user set this when initializing the `WhoScored` object or any other object that needs a Chrome-driver (but I think this is only relevant for WhoScored?)
Author
Owner

@pytoni commented on GitHub (Sep 1, 2023):

I got the same issue. My Chrome version is 116.
I did change _common.py to return uc.Chrome(options=chrome_options, version_main=116), but it's not working.

<!-- gh-comment-id:1702824819 --> @pytoni commented on GitHub (Sep 1, 2023): I got the same issue. My Chrome version is 116. I did change _common.py to return uc.Chrome(options=chrome_options, version_main=116), but it's not working.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#37
No description provided.