I have been individually testing 2 different scripts that perform separate actions using selenium in python for hours per day without issue, but when I run both tests at the same time they seem to interfere with each other. They are using the same driver binary and are usually running for hours at end, usually takes under an hour for this error to appear, and it only seems to appear when both test have been running for a bit, haven't seen this error appear when just one script has been running.
Is there any additional configuration or options I can change with selenium web driver to prevent them from interfering with each other? I also wonder if the issue I'm having isn't because of the two separate selenium web driver instances interfering. I think another possibility is the two separate web hooks being sent because the only line of code that appears in the error message and points to a line I have written is "File "C:\Users\User\Documents\python\waifu\new_waifus.py", line 101, in hook.send(embed=embed)" I have spent most of my day troubleshooting and havent come to a solid conclusion so if anyone else has some insight I would love to hear it :)
Also if anyone would like to see the code for both the python programs, let me know and I would gladly send both. I didn't start by sending them because the program works flawlessly every time when they both aren't run simultaneously.
Configuration details:
- Chrome Version: 104.0.5112.102
- Chrome Driver Version: 104.0.5112.20 (as close as I could get it)
- Operating System: Windows 10 Pro
- Python Version: 3.9.13
- Selenium Version: 4.4.3
Here a full error example:
Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Program Files\Python39\lib\http\client.py", line 1377, in getresponse response.begin() File "C:\Program Files\Python39\lib\http\client.py", line 320, in begin version, status, reason = self._read_status() File "C:\Program Files\Python39\lib\http\client.py", line 281, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Program Files\Python39\lib\socket.py", line 704, in readinto return self._sock.recv_into(b) File "C:\Program Files\Python39\lib\ssl.py", line 1242, in recv_into return self.read(nbytes, buffer) File "C:\Program Files\Python39\lib\ssl.py", line 1100, in read return self._sslobj.read(len, buffer) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Program Files\Python39\lib\http\client.py", line 1377, in getresponse response.begin() File "C:\Program Files\Python39\lib\http\client.py", line 320, in begin version, status, reason = self._read_status() File "C:\Program Files\Python39\lib\http\client.py", line 281, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Program Files\Python39\lib\socket.py", line 704, in readinto return self._sock.recv_into(b) File "C:\Program Files\Python39\lib\ssl.py", line 1242, in recv_into return self.read(nbytes, buffer) File "C:\Program Files\Python39\lib\ssl.py", line 1100, in read return self._sslobj.read(len, buffer) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\User\Documents\python\waifu\new_waifus.py", line 101, in <module> hook.send(embed=embed) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\dhooks\client.py", line 275, in send return self._request('POST', payload, file=file) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\dhooks\client.py", line 359, in _request resp = self.session.post(self.url, json=payload, File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 635, in post return self.request("POST", url, data=data, json=json, **kwargs) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\requests\adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))