aisingapore / TagUI

Free RPA tool by AI Singapore
Apache License 2.0
5.67k stars 584 forks source link

ERROR - jSON Parse error: Unexpected identifier "ERROR" (Using Moxie Studio) #759

Closed 92Ashutosh closed 4 years ago

92Ashutosh commented 4 years ago

Hi All,

I just start learning Tagui So I faced one issue.I'm sharing my code, please suggest how to resolve this.

columnValues = [] weatherresult=''

//< [OpenExcel] comment="" session="excel_session;input" file="C:\Users\Admin\Desktop\TaguiDemo.csv;input" isSpecificSheetName="false" isModeUsage="false" mode="None" sheet=";"

py begin excel_session=OpenExcel('C:\Users\Admin\Desktop\TaguiDemo.csv',None,'') py finish ///> //< [FetchExcelColumnValues] comment="" session="excel_session" columns="A;input" isHeader="false" resultToVariable="true" list="columnValues;variable"

py begin FetchExcelColumnValues(excel_session,'A',False) py finish columnValues = JSON.parse(py_result) ///>

//< [LoopByItem] comment="" element="item" list="columnValues" for (index = 0; index < columnValues.length;index++) { item = columnValues[index] columnIndex = 'B'+(index+1) https://www.google.com/search?q=`item` //< [Read] comment="" value="//[@id="wob_tm"];input" to="weatherresult;input" read //[@id="wob_tm"] to weatherresult ///> //< [UpdateExcelCell] comment="" session="excel_session;input" cellCoordinate="columnIndex;variable" cellValue="columnValues;variable"

                py_step('columnIndex = """' + columnIndex + '"""')
                py_step('columnValues = """' + columnValues + '"""')
                py begin
                UpdateExcelCell(excel_session,columnIndex,columnValues)
                py finish
            ///>

} ///>

//< [SaveExcel] comment="" session="excel_session"

py begin SaveExcel(excel_session) py finish ///> This script showing error : ERROR - jSON Parse error: Unexpected identifier "ERROR"

kensoh commented 4 years ago

Hi @92Ashutosh MoxieRPA is not developed or maintained by TagUI team, closing the issue here as we can't advise on the error.

From the code it looks strange that it is trying to JSON.parse() an input that is from a csv file. You can try reaching out to MoxieRPA team here http://moxierpa.com or its creator at @muratcim

CC @siowyisheng