正如@endre所说,我的代码不对。这是正确的代码(没有值)。
ultima_fecha_cargada = ultima_fecha_cargada.first()
然后按日期过滤。
inventario_producto = inventario_original.filter(fecha=ultima_fecha_cargada.fecha)
现在它开始工作了。奇怪的是,在我看到使用的结果之前 ultima_fecha_cargada.first().values("fecha") ,获取了预期值,正确打印出来,没有错误消息。
ultima_fecha_cargada.first().values("fecha")
现在,在重新启动PC之后,我开始收到错误消息,代码看起来像endre所说的那样。