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
Hi. After upgrading from 0.17.1 to 0.22.2, i got following error
File "/Users/20010116/.pyenv/versions/3.9.17/envs/venv-ddiapi2-py39/lib/python3.9/site-packages/xprocess/pytest_xprocess.py", line 59, in xprocess
open(log_file, errors="surrogateescape").close()
IsADirectoryError: [Errno 21] Is a directory: '/Users/20010116/Documents/Workspace/ddi/infrasvc-ddi-api/.pytest_cache/d/.xprocess/consumer_start_consumer/log'
Digging the error, i found that get_log_files list all objects in root directory, including directory (i have one that is named "log")
I suggest to add a condition to verify if object is a file
def get_log_files(root_dir):
proc_dirs = [f.path for f in os.scandir(root_dir) if f.is_dir()]
return [
os.path.join(proc_dir, f)
for proc_dir in proc_dirs
for f in os.listdir(proc_dir)
if f.endswith("log") and os.path.isfile(os.path.join(proc_dir, f))
]
The text was updated successfully, but these errors were encountered:
Hey @llicour , thanks for taking the time to open the issue! Could you provide a bit more info? Maybe sharing how you are using xprocess? The reason I ask is because there should not be nested directories inside xprocess cache dir at all so we should first understand how this happened before moving further with any changes
Hi. After upgrading from 0.17.1 to 0.22.2, i got following error
Digging the error, i found that get_log_files list all objects in root directory, including directory (i have one that is named "log")
I suggest to add a condition to verify if object is a file
The text was updated successfully, but these errors were encountered: