mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-26 02:25:51 +03:00
[GH-ISSUE #54] [WhoScored] Module not working #7
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gbordapoo on GitHub (Jun 6, 2022).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/54
Which Python version are you using?
Python 3.9.12
Which version of soccerdata are you using?
import soccerdata as sd
ws = sd.WhoScored(proxy='tor')
What did you do?
Install soccerdata with 'python3 -m pip install soccerdata'
What did you expect to see?
create ws variable
What did you see instead?
Output from spyder call 'get_cwd':
[06/05/22 22:08:48] INFO Saving cached data to /Users/gustavob _common.py:\91
orda/soccerdata/data/WhoScored
[06/05/22 22:08:50] INFO patching driver executable /Users/gu \patcher.py:\231
stavoborda/Library/Application Suppo
rt/undetected_chromedriver/b170e9511
dda09d2_chromedriver
[06/05/22 22:08:50] INFO No custom team name replacements _config.py:85
found. You can configure these in /Us
ers/gustavoborda/soccerdata/config/te
amname_replacements.json.
INFO No custom league dict found. You can _config.py:155
configure additional leagues in /Use
rs/gustavoborda/soccerdata/config/le
ague_dict.json.
INFO Saving cached data to /Users/gustavob _common.py:91
orda/soccerdata/data/WhoScored
[06/05/22 22:08:52] INFO patching driver executable /Users/gu patcher.py:231
stavoborda/Library/Application Suppo
rt/undetected_chromedriver/a44ea0bfa
6137f97_chromedriver
Output from spyder call 'get_cwd':
1
spawn.py 116 spawn_main
exitcode = _main(fd, parent_sentinel)
spawn.py 125 _main
prepare(preparation_data)
spawn.py 236 prepare
_fixup_main_from_path(data['init_main_from_path'])
spawn.py 287 _fixup_main_from_path
main_content = runpy.run_path(main_path,
runpy.py 268 run_path
return _run_module_code(code, init_globals, run_name,
runpy.py 97 _run_module_code
_run_code(code, mod_globals, init_globals,
runpy.py 87 _run_code
exec(code, run_globals)
untitled0.py 3
ws = sd.WhoScored(proxy='tor')
whoscored.py 87 init
super().init(
_common.py 383 init
self._driver = self._init_webdriver()
_common.py 410 _init_webdriver
return uc.Chrome(options=chrome_options)
init.py 388 init
self.browser_pid = start_detached(
dprocess.py 30 start_detached
multiprocessing.Process(
process.py 121 start
self._popen = self._Popen(self)
context.py 224 _Popen
return _default_context.get_context().Process._Popen(process_obj)
context.py 284 _Popen
return Popen(process_obj)
popen_spawn_posix.py 32 init
super().init(process_obj)
popen_fork.py 19 init
self._launch(process_obj)
popen_spawn_posix.py 42 _launch
prep_data = spawn.get_preparation_data(process_obj._name)
spawn.py 154 get_preparation_data
_check_not_importing_main()
spawn.py 134 _check_not_importing_main
raise RuntimeError('''
RuntimeError:
@probberechts commented on GitHub (Jun 6, 2022):
This is a frequently recurring issue in the undetected-chromedriver repo. See for example, #561. Basically, you have to protect the constructor when you run it from a script.