RPA dev foundation, Data Manipulation, practice 4 question

I get this error:
For each - outer: Unable to cast object of type ‘System.Collections.Generic.KeyValuePair2[System.String,System.Collections.Generic.Dictionary2[System.String,System.Double]]’ to type ‘System.Collections.Generic.Dictionary`2[System.String,System.Double]’

I tried different ways to solve this - no luck.
(I also downloaded the solution, but ½ of it won’t load/show i editor …)


  1. Is there implicit conversion when iterating in a for-loop - is that where the KeyValuePair is constructed?
  2. I haven’t tried debugging recently… But i find the visual aid overly broad: The entire outer-for-each loop is marked i studio. Can I use breakpoints to pinpoint the cause of this error?
  3. I dont’ really understand the compilation and run-time system of UIpath. Since I have no errors before this runs, i assume at least the pre-compiler accepts the variable declarations and conversions, so it is a runtime error. Any tips to understanding the inner workings of compilation, variable instantiations and runtime of UIPath would be welcome.
  4. re. uploading code: when do I get permission to do that?!

Origional poster: Code upload
DemoCombinedWeight.zip (15.1 KB)