【代码报错】“NameError: name 'order_target_percent' is not defined”

在编译运行时一直提示“NameError: name 'order_target_percent' is not defined”,帮忙看下是什么情况,怎样优化。