pygrametl

pygrametl CSVSource TypeError: init() takes at least 2 arguments (1 given)

两盒软妹~` 提交于 2019-12-20 04:37:03
问题 I am trying to use pygrametl CSVSource as shown in the documentation This is my code import pygrametl from pygrametl.datasources import CSVSource src = CSVSource(csvfile=open('src.csv', 'r', 16384), \ delimiter=',') but I get the following error even though I use the exact code. TypeError: init () takes at least 2 arguments (1 given) How can I fix this? 回答1: From the documentation You mentioned, we can see that CSVSource is just reference to DictReader from csv module. If we look at the