I am trying to use StreamPlot with units. Here is a minimal example to produce the error "Part is not a Graphics primitive or directive." :
g[x_] := UnitSimplify[UnitConvert[x Quantity["Seconds"]]/Quantity["Seconds"]]StreamPlot[{x, g[x]}, {x, 0, 1}, {y, 0, 1}]
With this change it works:
g[x_] := UnitSimplify[x UnitConvert[Quantity["Seconds"]]/Quantity["Seconds"]]StreamPlot[{x, g[x]}, {x, 0, 1}, {y, 0, 1}]
Why does this happen?