[GH-ISSUE #617] [WhoScored] javascript error: requirejs is not defined #116

Closed
opened 2026-03-02 15:55:55 +03:00 by kerem · 4 comments
Owner

Originally created by @WillT23 on GitHub (Jun 26, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/617

Hi, hopefully you are able to help (and thanks again for this fantastic package!).

Was able to use this earlier this week no problem, but encountering an error today like below when trying to scrape any game from any league (custom or default). I've updated the soccerdata package, and updated other packages but the error remains. Am I missing something simple?

Thanks, Will

[06/26/24 20:49:26] ERROR    Error while scraping https://www.whoscored.com/Matches/1729417/Live.    [_common.py](file:///C:/Users/will-/anaconda3/lib/site-packages/soccerdata/_common.py):[655](file:///C:/Users/will-/anaconda3/lib/site-packages/soccerdata/_common.py#655)
                             Retrying in 0 seconds... (attempt 1 of 5).                                            
                             Traceback (most recent call last):                                                    
                               File                                                                                
                             "C:\Users\will-\anaconda3\lib\site-packages\soccerdata\_common.py",                   
                             line 646, in _download_and_save                                                       
                                 response = json.dumps(self._driver.execute_script("return " +                     
                             var)).encode(                                                                         
                               File                                                                                
                             "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\w               
                             ebdriver.py", line 414, in execute_script                                             
                                 return self.execute(command, {"script": script, "args":                           
                             converted_args})["value"]                                                             
                               File                                                                                
                             "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\w               
                             ebdriver.py", line 354, in execute                                                    
                                 self.error_handler.check_response(response)                                       
                               File                                                                                
                             "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\e               
                             rrorhandler.py", line 229, in check_response                                          
                                 raise exception_class(message, screen, stacktrace)                                
                             selenium.common.exceptions.JavascriptException: Message: javascript                   
                             error: requirejs is not defined                                                       
                               (Session info: chrome=126.0.6478.116)                                               
                             Stacktrace:                                                                           
                                     GetHandleVerifier [0x011DC1C3+27395]                                          
                                     (No symbol) [0x01173DC4]                                                      
                                     (No symbol) [0x01071B7F]                                                      
                                     (No symbol) [0x01076C7F]                                                      
                                     (No symbol) [0x01078B7F]                                                      
                                     (No symbol) [0x010ED51B]                                                      
                                     (No symbol) [0x010D399C]                                                      
                                     (No symbol) [0x010ECB24]                                                      
                                     (No symbol) [0x010D3736]                                                      
                                     (No symbol) [0x010A7541]                                                      
                                     (No symbol) [0x010A80BD]                                                      
                                     GetHandleVerifier [0x01493A93+2876371]                                        
                                     GetHandleVerifier [0x014E7F5D+3221661]                                        
                                     GetHandleVerifier [0x0125D634+556916]                                         
                                     GetHandleVerifier [0x0126474C+585868]                                         
                                     (No symbol) [0x0117CE04]                                                      
                                     (No symbol) [0x01179818]                                                      
                                     (No symbol) [0x011799B7]                                                      
                                     (No symbol) [0x0116BF0E]                                                      
                                     BaseThreadInitThunk [0x76AF7BA9+25]                                           
                                     RtlInitializeExceptionChain [0x77EAC10B+107]                                  
                                     RtlClearBits [0x77EAC08F+191]
Originally created by @WillT23 on GitHub (Jun 26, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/617 Hi, hopefully you are able to help (and thanks again for this fantastic package!). Was able to use this earlier this week no problem, but encountering an error today like below when trying to scrape any game from any league (custom or default). I've updated the soccerdata package, and updated other packages but the error remains. Am I missing something simple? Thanks, Will ``` [06/26/24 20:49:26] ERROR Error while scraping https://www.whoscored.com/Matches/1729417/Live. [_common.py](file:///C:/Users/will-/anaconda3/lib/site-packages/soccerdata/_common.py):[655](file:///C:/Users/will-/anaconda3/lib/site-packages/soccerdata/_common.py#655) Retrying in 0 seconds... (attempt 1 of 5). Traceback (most recent call last): File "C:\Users\will-\anaconda3\lib\site-packages\soccerdata\_common.py", line 646, in _download_and_save response = json.dumps(self._driver.execute_script("return " + var)).encode( File "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\w ebdriver.py", line 414, in execute_script return self.execute(command, {"script": script, "args": converted_args})["value"] File "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\w ebdriver.py", line 354, in execute self.error_handler.check_response(response) File "C:\Users\will-\anaconda3\lib\site-packages\selenium\webdriver\remote\e rrorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.JavascriptException: Message: javascript error: requirejs is not defined (Session info: chrome=126.0.6478.116) Stacktrace: GetHandleVerifier [0x011DC1C3+27395] (No symbol) [0x01173DC4] (No symbol) [0x01071B7F] (No symbol) [0x01076C7F] (No symbol) [0x01078B7F] (No symbol) [0x010ED51B] (No symbol) [0x010D399C] (No symbol) [0x010ECB24] (No symbol) [0x010D3736] (No symbol) [0x010A7541] (No symbol) [0x010A80BD] GetHandleVerifier [0x01493A93+2876371] GetHandleVerifier [0x014E7F5D+3221661] GetHandleVerifier [0x0125D634+556916] GetHandleVerifier [0x0126474C+585868] (No symbol) [0x0117CE04] (No symbol) [0x01179818] (No symbol) [0x011799B7] (No symbol) [0x0116BF0E] BaseThreadInitThunk [0x76AF7BA9+25] RtlInitializeExceptionChain [0x77EAC10B+107] RtlClearBits [0x77EAC08F+191] ```
kerem 2026-03-02 15:55:55 +03:00
Author
Owner

@WillT23 commented on GitHub (Jun 26, 2024):

Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks?

<!-- gh-comment-id:2192627200 --> @WillT23 commented on GitHub (Jun 26, 2024): Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks?
Author
Owner

@adlihs commented on GitHub (Jun 27, 2024):

Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks?

Mate how do you fix the issue?

<!-- gh-comment-id:2195746947 --> @adlihs commented on GitHub (Jun 27, 2024): > Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks? Mate how do you fix the issue?
Author
Owner

@WillT23 commented on GitHub (Jun 28, 2024):

Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks?

Mate how do you fix the issue?

In the fix above my comment he's made some changes to the whoscored file - I just inputted those changes into my file within the soccerdata library folder.

<!-- gh-comment-id:2197241422 --> @WillT23 commented on GitHub (Jun 28, 2024): > > Your changes seemed to have worked - thank you so much. Do you have somewhere for donations or perhaps a charity I could donate to on your behalf by way of thanks? > > Mate how do you fix the issue? In the fix above my comment he's made some changes to the whoscored file - I just inputted those changes into my file within the soccerdata library folder.
Author
Owner

@probberechts commented on GitHub (Jun 28, 2024):

Or now simply pip install soccerdata==1.8.1.

<!-- gh-comment-id:2197436321 --> @probberechts commented on GitHub (Jun 28, 2024): Or now simply `pip install soccerdata==1.8.1`.
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#116
No description provided.