Read existing gurobi .lp-file and add constraints to it
Without knowing your error message, I assume the problem is that you have not defined x.
The quickest way to fix this would probably be to reconstruct the variable name (that you defined earlier when building the model) from the SI values and then  access the variables with getVarByName.
If this is slow because the model is big and you are accessing many variables, you could instead get the array of all variables with model.getVars(), then iterate over this and rebuild your multi-dimensional array (or tuple_dict) x by parsing the names of the variables.
I have a little problem using Gurobi in Python. I have a .lp-file, where my linear programm is saved. To these constraints I want to add some additional constraints. Loading and optimizing works without any problems, but I just cannot add new constraints to my model. I do not know what I am doing wrong...
I hope there is someone, who finds my mistake!
Thanks!
My code looks like below (I made it a bit easier)
SI is a two-dimensional array containing the data for every variable.
from gurobipy import *
model = read("testdatei.lp")
for j in range(len(SI)):
    model.addConstr(x[SI[j][0], SI[j][1], SI[j][2], SI[j][3], SI[j][4], SI[j][5]] == 1)