TagUI icon indicating copy to clipboard operation
TagUI copied to clipboard

Unable to use braces when calling a TagUI Workflow inside another script - use indentation instead of curly braces

Open chialiyun opened this issue 1 year ago • 3 comments

I am receiving the error below when I am trying to call another tagui script within the flow where I have a for loop.

ERROR - number of step { does not tally with with }
ERROR - automation aborted due to above

e.g. child.tag

echo hello

parent.tag

tagui child.tag
for n from 1 to 5 
{
     echo n
}

chialiyun avatar Mar 05 '23 15:03 chialiyun

Hi @chialiyun you can use indentations instead of using braces

tagui child.tag
for n from 1 to 5
    echo n

https://tagui.readthedocs.io/en/latest/main_concepts.html#for-loops

ruthtxh avatar Mar 06 '23 06:03 ruthtxh

@ruthtxh it did not work for me.

here's my code: child.tag

UrlDict = {}

csv_file = 'file.csv'
load `csv_file` to lines

array_lines = lines.split('\n')
 
for (n=1; n<array_lines.length; n++) 
  items = array_lines[n].split(',')
  country = items[0].trim()
  UrlDict[country] = items[4].trim()

url = UrlDict[p1]
echo `url`

parent.tag

tagui child.tag
echo selected `UrlDict['sg']`

for n from 1 to 4
    echo n

chialiyun avatar Mar 06 '23 13:03 chialiyun

@ruthtxh it did not work for me.

here's my code: child.tag

UrlDict = {}

csv_file = 'file.csv'
load `csv_file` to lines

array_lines = lines.split('\n')
 
for (n=1; n<array_lines.length; n++) 
  items = array_lines[n].split(',')
  country = items[0].trim()
  UrlDict[country] = items[4].trim()

url = UrlDict[p1]
echo `url`

parent.tag

tagui child.tag
echo selected `UrlDict['sg']`

for n from 1 to 4
    echo n

hi chialiyun, when the csv content contains "\n", image image #,firstname,lastname 1,tony,stark 2,bruce,wayne 3,peter,parker 4,"Dr Steve",Strange how to do it...?

xin911 avatar Mar 08 '23 04:03 xin911

Closing but please ping back if this is still relevant of an issue.

kensoh avatar Aug 19 '24 12:08 kensoh