Because of the file .ds_store which inteferes with the reading of the data, and possibly other reasons undetermined, the program does not run properly under macOs currently.
The root cause of this error is that during the process of searching for file directories, we used a loop adding '/' every time the directory is still not a file. So the result directory is like 'aaa/bbb/ccc/'. While it works as a file directory in Windos, Mac does not supply this as a file. So we have to delete the last character.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All other tests are run in Windos 10 environment because the program fails in Mac Os at the basic level.
The root cause of this error is that during the process of searching for file directories, we used a loop adding '/' every time the directory is still not a file. So the result directory is like 'aaa/bbb/ccc/'. While it works as a file directory in Windos, Mac does not supply this as a file. So we have to delete the last character.
problem solved