Patrowl / PatrowlManager

PatrOwl - Open Source, Smart and Scalable Security Operations Orchestration Platform
https://www.patrowl.io
GNU Affero General Public License v3.0
625 stars 112 forks source link

add new assets in bulk (CSV) does not Work #127

Closed ichossef closed 4 years ago

ichossef commented 4 years ago

Hello guys,

I hope that you all are doing well.

I am having issues adding assets in bulk using a CSV file. I've used the template given in the Manager assets_bulk.zip

and I receive a traceback error KeyError at _assets_bulkadd.zip

Could you help me pls ?

Best regards,

MaKyOtOx commented 4 years ago

Hi, Your CSV file seems to be buggy:

line | OrderedDict([('\ufeffasset_value', 'patrowl.io'),
 ('asset_name', 'Patrowl domain name'),
('asset_type', 'domain'), 
('asset_description', 'Patrowl domain name'), 
('asset_criticity', 'high'), 
 ('asset_groupname', 'recently_imported')])
-- | --

a Unicode char '\ufeff' has been added in the first line/cell

Could you please try to remove it ?

agrandville commented 4 years ago

hi @ichossef, your file was probably generated on Windows OS. Your file begins with 3 bytes EF BB BF corresponding to UTF8-BOM. Try to save your file without encoding eg. with notepad++ image