我已经用下面的代码读取了文件的路径。在
import os
directory = os.listdir("/home/user/Downloads/SE_75_Ice")
fcount = len(directory)
i =0
while i < fcount :
directory[i] = ('"'+'/home/user/Downloads/SE_75_Ice/'+directory[i]+'"')
print(directory[i])
i = i+1
我试着用下面的代码读了几个文件。在
^{pr2}$运行上述代码时,出现以下错误:
AttributeError: 'NoneType' object has no attribute 'GetRasterBand'
我想可能是目录列表不是字符串类型,所以不能读路径
请告诉我上述问题的解决方案或如何一次读取多个文件。在
目前没有回答
相关问题 更多 >
编程相关推荐