Message Pop up while adding operations to Routing

Dear Community any idea. Why does the following message appear while add operations to routing

Field total_cost not found

I found the line of code causing this. Any suggestions