I am working with the tutorial here on Flux Balance Analysis with CobraPy (https://cnls.lanl.gov/external/qbio2018/Slides/FBA%202/qBio-FBA-lab-slides.pdf) and trying to replicate their results with CobraPy. It appears I need to create a separate copy of the "Biomass_Ecoli_core" reaction to be "Biomass_Ecoli_WT" on which I would perform the FBA. On the cobrapy documentation I found out a way to copy the core reaction to a WT reaction copy. However, when I now introduce the new reaction bounds and optimization problem:
##This code lets us run Flux Balance Analysis to maximize flux through biomass (growth)
##and output a .csv of the flux values in the solution
import cobra
# import cobra.test
import cobra.io
from cobra.io import load_model
from cobra import Model, Reaction, Metabolite
#cobra.io.load_model('textbook')
import pandas
#Load the model for genome scale E. coli iJO1366
model = load_model("textbook")
#model = create_test_model("ecoli")
#Set the objective to biomass
# creating a new WT copy of Ecoli Core Rxn as objective-type fxn
reaction_WT = model.reactions.get_by_id("Biomass_Ecoli_core").copy()
reaction_WT.id = "Biomass_Ecoli_WT"
model.reactions.insert(13,reaction_WT)
model.reactions
#model.reactions.get_by_id("Ec_biomass_iJO1366_core_53p95M").objective_coefficient = 0
model.reactions.get_by_id("Biomass_Ecoli_core").objective_coefficient = 0 # this is index 12
model.reactions
#model.reactions.get_by_id("Ec_biomass_iJO1366_WT_53p95M").objective_coefficient = 1.0
model.reactions.get_by_id("Biomass_Ecoli_WT").objective_coefficient = 1.0
#Set constraints for aerobic growth in glucose minimal media
model.reactions.get_by_id("EX_glc_e").lower_bound= -10
model.reactions.get_by_id("EX_o2_e").lower_bound = -15
#Solve
solution = model.optimize() #solution is stored at model.solution
#Output solution
print('Growth Rate: '+str(solution.objective_value)+' 1/h')
df=pandas.DataFrame.from_dict([solution.x_dict]).T
df.to_csv('FBA_max_biomass.csv')
# Output more information
model.summary()
it says that the model reaction is not recognized

even though it appears in the list of reactions:

What's going on?