SergeyPirogov / webdriver_manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

StefanoGiu opened this issue · comments

I have installed webdriver_manager 4.0.0 on Windows 10 with Python 3.11
If I try to execute:
webdriver.Chrome(service=Service(ChromeDriverManager().install())

I got the following error:
Traceback (most recent call last):
File "Test.py", line 50, in
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=woptions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\site-packages\webdriver_manager\chrome.py", line 40, in install
driver_path = self._get_driver_binary_path(self.driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\site-packages\webdriver_manager\core\manager.py", line 35, in get_driver_binary_path
binary_path = self.cache_manager.find_driver(driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 106, in find_driver
metadata = self.load_metadata_content()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 135, in load_metadata_content
return json.load(outfile)
^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\json_init
.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\json_init
.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Im getting the same issue on one of our devices, totally unclear why

delete .wdm folder and try again