[error] Internal variable "!COL4" not supported - while cycle reading CSV

Hello.
I try to use CSV and open links from it.
I modified basic example to open URL from CSV.
It passes 1 line and when comes to 2 line it fails on first calling “!COLx” variable and throws an error
“[error] Internal variable “!COL4” not supported”
Screenshot: Screenshot by Lightshot

JSON code of script

{
“Name”: “!BUG_open_sites_csv”,
“CreationDate”: “2019-4-24”,
“Commands”: [
{
“Command”: “comment”,
“Target”: “The file ReadCSVTestData.csv is pre-installed with Kantu.”,
“Value”: “”
},
{
“Command”: “csvRead”,
“Target”: “SitesCheck_error.csv”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}”,
“Value”: “”
},
{
“Command”: “while”,
“Target”: “"${!csvReadStatus}" == "OK"”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “status = ${!csvReadStatus}, line = ${!csvReadLineNumber}”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “${!COL4}”,
“Value”: “URL”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=OPEN”,
“Value”: “${URL}”
},
{
“Command”: “echo”,
“Target”: “opened = ${URL}”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “${!COL5}”,
“Value”: “URL”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=OPEN”,
“Value”: “${URL}”
},
{
“Command”: “echo”,
“Target”: “opened = ${URL}”,
“Value”: “”
},
{
“Command”: “storeEval”,
“Target”: “${!csvReadLineNumber}+1”,
“Value”: “!csvReadLineNumber”
},
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorIgnore”
},
{
“Command”: “echo”,
“Target”: "Reading CSV line No. ${!csvReadLineNumber} ",
“Value”: “!errorIgnore”
},
{
“Command”: “csvRead”,
“Target”: “ReadCSVTestData.csv”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “false”,
“Value”: “!errorIgnore”
},
{
“Command”: “endWhile”,
“Target”: “”,
“Value”: “”
}
]
}

CSV file is a list like this:
5,7,DE,https://forum.a9t9.com ,https://a9t9.com,
7,7,SE,https://forum.a9t9.com ,https://a9t9.com,
5,7,DE,https://forum.a9t9.com ,https://a9t9.com,
7,7,SE,https://forum.a9t9.com ,https://a9t9.com,

Macro with this list reproduces the error for me, please check.

What can be the reason?
Note: Demo macros plays fine.
My system: Screenshot_181

Tick the common and advanced boxes for variables and see what col1… are after the csvRead.
My guess you have an empty line or line break somewhere in the line you try to read.

1 Like

Thanks for a hint.
Very useful checkboxes =)
I missed to change the second place where macro reads the csv, and it failed on unexisting line.
Great thanks for quick answer!