我正在从目录中解析XML文件,但是在给定文件名的情况下,找不到显示该目录中文件之一的错误。
import os
BASE_DIRECTORY = ('/home/nikhil/Animesh/13.08.2019/XML/3000')
for (dirpath, dirnames, filenames) in os.walk(BASE_DIRECTORY):
for f in filenames:
xml_file = f
tree = ET.parse(xml_file)```
FileNotFoundError: [Errno 2] No such file or directory: 'sample267.xml'