cancel
Showing results for 
Search instead for 
Did you mean: 
Post a Question
Employee
Employee

Why is batch import rules failing?

Jump to solution

Any idea what is going wrong with this batch operation to add a couple of rules?

C:\Users\admin>mgmt_cli -m 172.27.254.180 -u api_user -p ****** add access-rule -b rule2.csv
Error occured during parsing of CSV file.
Line 1 column 6: Unexpected character in the end of line.
Failed to read parameters file [rule2.csv]: Invalid format



C:\Users\admin>more rule2.csv
layer,position,source,destinaton,service,action
Network,bottom,keith,lab.local-ad,http,accept
Network,bottom,lab.local-ad,keith,smtp,drop
1 Solution

Accepted Solutions
Employee
Employee

Re: Why is batch import rules failing?

Jump to solution

Thanks Robert - turns out that Notepad++ had created my file encoded with UCS-LE BOM. I don't recognize it so switched to UTF-8 and the errors disappeared! 

0 Kudos
3 Replies
Employee++
Employee++

Re: Why is batch import rules failing?

Jump to solution

Please ensure that each line ends with CRLF characters - 

"endline can be \n - in Linux or \r\n - in Windows, therefore after \r we expect \n othrwise input is invalid"

Employee
Employee

Re: Why is batch import rules failing?

Jump to solution

Thanks Robert - turns out that Notepad++ had created my file encoded with UCS-LE BOM. I don't recognize it so switched to UTF-8 and the errors disappeared! 

0 Kudos
Vladimir
Jade

Re: Why is batch import rules failing?

Jump to solution

Probably end of the line issue.

What editor have you used to create the CSV?

Take a look here for possibilities to modify the EOLs:

excel - CSV End of line - Stack Overflow