Getting cycle number from summary variables

Hi,

Before I was doing
sim = pybamm.Simulation(spm, experiment=experiment, parameter_values=parameter_values)

Solve the model

sol = sim.solve()

Extract cycle number and discharge capacity

cycle_number = sol.summary_variables[‘Cycle number’]

and it would get the cycle number from the summary variables. I am running this code again after a few days and now it throws an error stating: ‘raise KeyError(f"Variable ‘{key}’ is not a summary variable.")
KeyError: "Variable ‘Cycle number’ is not a summary variable.’

Which is confusing to me. Did PyBaMM get a new update which changed the way you get your cycle numbers?

I tried to get the number of cycles using length of sol.summary_variables.cycles and tried plotting it with discharge capacity (Capacity [A.h]), the graph this produces is different from what it used to look like. Did some changes take place that I missed out regarding these? Any information or help is greatly appreciated.

Strange, maybe it’s a version issue. summary_variables[‘Cycle number’] works fine for me. I am running 24.11.2