washingtonpost / aws-tagger

AWS bulk tagging tool
MIT License
118 stars 76 forks source link

Attempt to use a CSV file failed #3

Open valencetech opened 6 years ago

valencetech commented 6 years ago

»cat resources.csv Id,Region,Business Unit,Project,Owner,ApplicationService,environment i-11111111111111111,eu-west-1,Commercial-and-Marketing,Loyalty,,Container, i-22222222222222222,eu-west-2,Commercial-and-Marketing,Loyalty,,Container, i-3333333333333333,eu-west-3,Commercial-and-Marketing,Loyalty,,Container,

» aws-tagger --csv resources.csv Traceback (most recent call last): File "/usr/local/bin/aws-tagger", line 11, in load_entry_point('aws-tagger==0.6.1', 'console_scripts', 'aws-tagger')() File "/Library/Python/2.7/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/Library/Python/2.7/site-packages/tagger/cli.py", line 22, in cli tagger.tag(csv) File "/Library/Python/2.7/site-packages/tagger/tagger.py", line 151, in tag self._tag_resource(tag_index, row) File "/Library/Python/2.7/site-packages/tagger/tagger.py", line 161, in _tag_resource resource_id = row[tag_index[self.resource_id_column]] KeyError: 'Id'

bruth commented 6 years ago

This is likely due to the BOM if you exported this from Excel.. https://stackoverflow.com/a/17912811/407954

bruth commented 6 years ago

Created #6