The sid in your error message (FIBBG00NNN9QQ8 ) is an old and no longer valid sid for KSPI. The correct sid for KSPI is FIBBG00L1KN476. Occasionally data providers issue new FIGIs (resulting in a new sid) due to corporate actions. This can result in two sids for what is logically a single security, and we have a process in place to merge the two sids into one when that happens.
The error message suggests that you have a historical KSPI execution in the blotter database under the old sid, but the bundle doesn't know about that sid but only about the new sid, resulting in the "No such sid in bundle" error. I have some ideas about how QuantRocket might handle this better in the next release, but for now, the best solution is to update the blotter database records for KSPI to use the new sid instead of the old sid. To do so, first set environment variables for your strategy and account in a JupyterLab Terminal. (This will allow you to run the subsequent commmands as-is.)
export ORDERREF=mystrategy
export ACCOUNT=myaccount
Next, query the records for the old sid to confirm they are there:
sqlite3 /var/lib/quantrocket/quantrocket.v2.blotter.executions.sqlite "SELECT Time, Sid, Side, Quantity, Price, OrderRef, Account FROM Execution WHERE Sid = 'FIBBG00NNN9QQ8' AND OrderRef = '$ORDERREF' AND Account = '$ACCOUNT'"
Then, update the records to use the new sid:
sqlite3 /var/lib/quantrocket/quantrocket.v2.blotter.executions.sqlite "UPDATE Execution SET Sid = 'FIBBG00L1KN476' WHERE Sid = 'FIBBG00NNN9QQ8' AND OrderRef = '$ORDERREF' AND Account = '$ACCOUNT'"
The next time Zipline runs, it will query your executions and see the new sid for KSPI, matching what's in the bundle.