import os import flowio import csv folder_path = "/path/to/folder" csv_path = "/path/to/csv" with open(csv_path, 'w', newline='') as csvfile: csvwriter = csv.writer(csvfile) for filename in os.listdir(folder_path): if filename.endswith(".fcs"): file_path = os.path.join(folder_path, filename) fcs = flowio.FlowData(file_path) events = fcs.events() csvwriter.writerows(events)中events = fcs.events()出现TypeError: 'array.array' object is not callable
时间: 2024-03-14 12:45:11 浏览: 119
读取文件_读取文件夹里所有文件并提取_python_
根据您提供的代码,将导致此错误的原因可能是您尝试对一个数组对象进行调用,但是数组对象不是可调用的。请尝试更改代码中的以下行:
```
events = fcs.events()
csvwriter.writerows(events)
```
为:
```
events = fcs.events
csvwriter.writerows(events())
```
这样可以将`events`属性作为可调用的函数进行调用,从而避免此TypeError错误。
阅读全文