我正在尝试从字节文件中提取特征。
通过
打开文件时with open('byteFiles/'+file,"r") as fp:
...
我收到错误消息“ Nosuchfilefound”。我检查了文件是否存在,甚至尝试将r
放在字节文件之前
with open(r'byteFiles/'+file,"r") as fp:
...
但我仍然无法修复它。
with open('byteFiles/'+file,"r") as fp:
lines=""
for line in fp:
a=line.rstrip().split(" ")[1:]
b=' '.join(a)
b=b+"\n"
text_file.write(b)
fp.close()
os.remove('byteFiles/'+file)
text_file.close()
我遇到了错误:
FileNotFoundError:[错误2]没有此类文件或目录:“ byteFiles / 01azqd4InC7m9JpocGv5”