Robotic Process Automation (RPA)

Robotic Process Automation (RPA)

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Could not create a Variant from value

    Posted Tue October 01, 2024 03:56 PM

    Hi, I'm running a script using IBM Launcher, and I'm getting this error:

    =============================================

    [2024-10-01T12:46:27.8510569-05:00] [3] [ERROR] - Could not create a Variant from value: 
    Nombre del parámetro: value Error al ejecutar el script ProcesoConciliacionCourseraSprint02Final en el número de línea 205:     mapTableRow --dataTable ${dataContableMISO} --row ${registroMapeoContMISO} --mappings "[{"Name":null,"Number":"36","Output":"${codigoEstudianteContMISO}"},{"Name":null,"Number":"37","Output":"${netoContableMiso}"}]"
    [2024-10-01T12:46:27.8293460-05:00] [2] [ERROR] - Could not create a Variant from value: 
    Nombre del parámetro: value
    [2024-10-01T12:46:24.9243576-05:00] [7] [INFO] - [Info] 
    Data Contable Miso:

    ===================================================

    I ran the same Script from RPA Studio and no error was shown, this is the Subroutine:

    beginSub --name insertarCodigo_NetoMISO
        excelOpen --file "${rutaLocalCoursera}\\Resumenes\\ResumenMISO${periodo}.xlsx" resumenMiso=value
        excelGetTable --file ${resumenMiso} --sheet "Contabilidad MISO Maest" --entiretable  --hasheaders  dataContableMISO=value filasContableMiso=rows
        logMessage --message "\r\nData Contable Miso: \r\n${dataContabilidadMiso}" --type "Info"
        while --left "${registrosContableMiso}" --operator "Less_Than_Equal_To" --right "${filasContableMiso}"
            mapTableRow --dataTable ${dataContableMISO} --row ${registroMapeoContMISO} --mappings "[{\"Name\":null,\"Number\":\"36\",\"Output\":\"${codigoEstudianteContMISO}\"},{\"Name\":null,\"Number\":\"37\",\"Output\":\"${netoContableMiso}\"}]"
            if --left "${codigoEstudianteContMISO}" --operator "Is_Null" --negate
                if --left "${codigoEstudianteContMISO}" --operator "Equal_To" --right "Grand Total" --negate
                    add --collection "${listaCodigosEstudiantesContMiso}" --value "${codigoEstudianteContMISO}"
                    add --collection "${listNetosContablesMiso}" --value "${netoContableMiso}"
                endIf
            endIf
            incrementVar --number ${registroMapeoContMISO}
            incrementVar --number ${registrosContableMiso}
        endWhile
        logMessage --message "${listaCodigosEstudiantesContMiso}" --type "Info"
        setVar --name "${registrosContableMiso}" --value 2
        count --collection "${listaCodigosEstudiantesContMiso}" cantidadCodigos=value
        foreach --collection "${listaCodigosEstudiantesContMiso}" --variable "${codigoEstudianteContMISO}"
            excelSet --value "${codigoEstudianteContMISO}" --file ${resumenMiso} --sheet "Resumen MISO Maest" --row ${registrosContableMiso} --column 1
            incrementVar --number ${registrosContableMiso}
        endFor
        setVar --name "${registrosContableMiso}" --value 2
        foreach --collection "${listNetosContablesMiso}" --variable "${netoContableMiso}"
            concatTexts --text "=IFERROR(VLOOKUP(A" --value "${registrosContableMiso};\'Académico MISO Maest\'!W:X;2;0);0)" formulaBuscarvMISO=value
            excelSet --value "${netoContableMiso}" --file ${resumenMiso} --sheet "Resumen MISO Maest" --row ${registrosContableMiso} --column 2
            excelSet --value "${formulaBuscarvMISO}" --isformula  --file ${resumenMiso} --sheet "Resumen MISO Maest" --row ${registrosContableMiso} --column 3
            incrementVar --number ${registrosContableMiso}
        endFor
        excelClose --file ${resumenMiso} --save
    endSub

    Thanks for your help



    ------------------------------
    Alex Virrueta
    ------------------------------


  • 2.  RE: Could not create a Variant from value

    Posted Fri October 04, 2024 11:42 AM

    Hi Alex! Since you reported that it works fine in Studio and supposing it runs with the exact same input data, I'm wondering if the Launcher and Studio are installations of the same version. They should be in the same version if you are running it on the same machine, but that might not be the case.

    Other than a mismatch between versions, I suppose you could get in touch with support to look into it.



    ------------------------------
    Vinicius Marques
    Data Engineer
    Music.AI
    Rio Grande
    ------------------------------



  • 3.  RE: Could not create a Variant from value

    Posted Mon October 07, 2024 06:00 PM

    Try to log your original data to make sure data is not null and data structure is expected! check log data at %localappdata% path 



    ------------------------------
    Trong Nguyen
    ------------------------------



  • 4.  RE: Could not create a Variant from value

    Posted Thu April 17, 2025 08:01 AM

    I had the same error. It was due to mapping a table row that contained a null value. When I changed the null value to empty for strings and 0 for numbers, the mapping returned to work. Generally, It is because of mapping null values. 



    ------------------------------
    Mohamed Ramadan
    ------------------------------