Issue with UiPath Demo under advanced training

Hi,

I’ve been working on the UiDemo workthrough for the past 2 days but cant get past the error message below:
{
“message”: “Assign: The given key was not present in the dictionary.”,
“level”: “Error”,
“logType”: “Default”,
“timeStamp”: “15:01:49”,
“processVersion”: “1.0.0”,
“jobId”: “c02b36b7-4b1a-4728-ba66-aeba426b82f6”,
“robotName”: “TestBot”,
“machineId”: 107005,
“fileName”: “Process”,
“logF_BusinessProcessName”: “Framework”
}

I managed to get the bot to open the app and login but it failed to retrieve the transaction details needed to proceed further.

I’ve also been reading through all the post i can find but seem to find a solution.

Pls help.

Thanks and regards,
ibisan

Somewhere in your workflow, you are using the invalid key.

in_Config("KeyName").TosString or Config("KeyName").ToString

Whatever the Key Name you are using is not present in the Config file.
Please verify.

Please Debug and check where exactly you are getting the error. So you will know which key name is not present in the config file.

Regards,
Karthik Byggari

1 Like

Hi @ibisan

Dictionary, the basic structure of the dictionary is Key and Value Key is like the unique identifier we use to access the value we need in the dictionary. So in REFramework, we use a Dictionary type variable to hold the data we have in the Config excel file as you may already know.

In this case, if you are getting this error, it means that some where in your code, you have mentioned a key which you want to access, which is not available in the dictionary. In other words, you are trying to access a value which is not specified in the Config excel.

There are many places in the REFramework you use the Config as @KarthikByggari mentioned. Search for those by running the entire program in the Debug mode so you will be able to execute the entire process step by step manually. This way, you can easily locate where you are getting the error, and what you are trying to access there.

Let know how it goes…

1 Like

@ibisan

This means that the key name which you’re using to retrieve its value from excel file is not available there. Please check key names in your workflow and verify with the excel.

Thank you for all the replies.

I’ve narrowed down the issue to the following function but in my code i did not make any reference to the config file.

Attached is the screenshot where the error occurred.
Does it mean that i need to add CashIn into the config file?

Nope… you are not supposed to add the CashIn to config. In your queue, can you open one record in the orchestrator and show me what values it holds… you can go to queue, click on view transaction to view the record. I need to see whether it holds a value under the name “CashIn”

Hi Lahiru,

It does.

Screenshot shown below pls:

CashIn looks fine… did you check the next one. “OnUsCheck”?

In the screenshot, it seems you have a space after check check word? Make sure you have that space where you read it… or you might need to remove it from where you write it to queue…

Easiest one right now is to check and add the space to where you read it from queue
in_TransactionItem.SpecificContent("OnUsCheck ").ToString

Hi Lahiru,

Thanks for pointing it out!

I re-ran the queue removing the space and everything is working now!

Thank u so so much.

Regards,
Ivy

1 Like

Awesome… please mark the answer as the solution so it will help others with the similar problem…

Good luck!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.