title: GUROBI: 'Missing constraint index' when adding constraint in Python
body: <p>Trying to add the following constraint in Gurobi/Python:
  <img src="https://i.stack.imgur.com/WNHeA.gif" alt="Constraint"></p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>N_SERVERS = 5                             #number of servers
  C_SERVER = [1]*N_SERVERS
  N_NODES = 3                               #number of nodes
  C_NODES = [2]*N_NODES    
  
  #create model
  m = Model("mip1")
  
  #declare variables
  x = m.addVars(len(C_SERVER), vtype=GRB.BINARY, name = "x")
  y = m.addVars(len(C_NODES), vtype=GRB.BINARY, name = "y")
  m.update()
  
  m.addConstrs(quicksum(x[i]*C_SERVER[i] for i in range(len(x))) + quicksum(y[j]*C_NODES[j] for j in range(len(y))) == quicksum(C_SERVER)
  </code></pre>
  
  <p>I get the following error: KeyError: 'Missing constraint index'. What is the reason?</p>