Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Keith_Richards
Employee Alumnus
Employee Alumnus
Jump to solution

Why is batch import rules failing?

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
Keith_Richards
Employee Alumnus
Employee Alumnus

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! 

View solution in original post

0 Kudos
3 Replies
Robert_Decker
Advisor

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"

Keith_Richards
Employee Alumnus
Employee Alumnus

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
Champion
Champion

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 

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Thu 05 Mar 2026 @ 08:00 AM (EST)

    Americas Deep Dive: HTTPS Inspection

    Thu 05 Mar 2026 @ 03:00 PM (CET)

    2026 Threat Landscape Briefing - EMEA

    Thu 05 Mar 2026 @ 11:00 AM (EST)

    Tips and Tricks 2026 #1: MCP Servers

    Thu 05 Mar 2026 @ 02:00 PM (EST)

    2026 Threat Landscape Briefing -AMER
    CheckMates Events