You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResourceWarning: unclosed file <_io.BufferedReader name error message when trying to destroy AppiumService via stop method:
/usr/lib/python3.8/subprocess.py:946: ResourceWarning: subprocess 16298 is still running
_warn("subprocess %s is still running" % self.pid,
Object allocated at (most recent call last):
File "...../.venv/lib/python3.8/site-packages/appium/webdriver/appium_service.py", lineno 196
self._process = sp.Popen(args=args, stdout=stdout, stderr=stderr, env=env)
sys:1: ResourceWarning: unclosed file <_io.BufferedReader name=7>
sys:1: ResourceWarning: unclosed file <_io.BufferedReader name=9>
It seems to me that the stderr and stout file handles are not closed properly.
According to subprocess.Popen documentation process.communicate shall be callled in order to close the stdout and stderr file handles.
…f subprocess.Popen process (#965)
#962
add a Popen.communicate call after terminate to ensure that file stdout and sdterr file descriptors are closed properly.
ResourceWarning: unclosed file <_io.BufferedReader name error message when trying to destroy AppiumService via stop method:
It seems to me that the stderr and stout file handles are not closed properly.
According to subprocess.Popen documentation process.communicate shall be callled in order to close the stdout and stderr file handles.
Environment
Appium Version: 2.5.1
Appium-Python-Client 3.1.0
selenium 4.15.2
Python3.8.10 on Ubuntu 20.04
node.js 20.11.1
Code To reproduce issue
python-client/appium/webdriver/appium_service.py
Line 237 in 92583ce
After self._process.terminate a call to Popen.communicate()](https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate) shall be made, which will close the file handles.
The text was updated successfully, but these errors were encountered: