SergeyPirogov / webdriver_manager

Apache License 2.0
2.04k stars 454 forks source link

`EOFError` occurs when i launch more than one script at the same time #600

Closed DUB1401 closed 1 year ago

DUB1401 commented 1 year ago

When i run more than one scripts at the same time, this error occurring in the first launched program. This issue may duplicate #290, but solution from comments didn't help me, and the topic is already closed. The problem also relevant without using selenium-wire.

System

OS: CentOS Stream 9 Python: 3.10.12 google-chrome-stable (on Linux): 116.0.5845.96 _webdrivermanager: 4.0.0 Selenium: 4.11.2 selenium-wire: 5.1.0

Launching

self.__Browser = webdriver.Chrome(service = Service(ChromeDriverManager().install()), seleniumwire_options = SeleniumWireOptions, options = ChromeOptions)

Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/webdriver_manager/core/file_manager.py", line 65, in __extract_zip
    archive.extractall(to_directory)
  File "/usr/local/lib/python3.10/zipfile.py", line 1647, in extractall
    self._extract_member(zipinfo, path, pwd)
  File "/usr/local/lib/python3.10/zipfile.py", line 1702, in _extract_member
    shutil.copyfileobj(source, target)
  File "/usr/local/lib/python3.10/shutil.py", line 195, in copyfileobj
    buf = fsrc_read(length)
  File "/usr/local/lib/python3.10/zipfile.py", line 927, in read
    data = self._read1(n)
  File "/usr/local/lib/python3.10/zipfile.py", line 995, in _read1
    data += self._read2(n - len(data))
  File "/usr/local/lib/python3.10/zipfile.py", line 1030, in _read2
    raise EOFError
EOFError
SergeyPirogov commented 1 year ago

We have a test for this. With pytest-xdist everything is ok.