# Fix " not a Graphics primitive or directive" error in Dynamic Locator Pane

I am aware this might seem like a duplicate, however, I have viewed these posts (1 & 2) and have been unable to solve this.

   DynamicModule[{pt = {.5, .5}, ll = {},
base = {White, Rectangle[{0, 0}, {2, 2}]}},
LocatorPane[Dynamic[pt, (AppendTo[ll, #]; pt = Last@ll) &],
Dynamic[Show@
Graphics[{base,
With[{newpts = Partition[ll, 2, 1]},
Table[{i, Line[newpts[[i]]]}, {i, 1, Length[newpts], 1}]]}]
]]]


Would someone be able to help me to solve this error? Thank in advance

A few things in your code were unnecessary (e.g. the Show before Graphics) and others were confusing and the cause of your trouble. Note that Line will take a list of points and construct a polygonal line from it automatically; you do not need to produce each segment in a separate Line statement, so the Partition and Table bits can be avoided.
DynamicModule[