Having value error

Hello everyone ,I am a new user of openmc. My plt() is showing value error and I cannot find the problem here. Looking forward to your help.

import numpy as np
tallies_file=openmc.Tallies()
energies = np.logspace(np.log10(1e-5), np.log10(20.0e6), 501)
e_filter = openmc.EnergyFilter(energies)

tally = openmc.Tally(name=‘flux’)
tally.filters = [openmc.CellFilter([assembly_cell])]
tally.filters.append(e_filter)
tally.scores = [‘flux’]
tallies_file.append(tally)

import matplotlib.pyplot as plt
t = sp.get_tally(name=‘flux’)
flux = t.mean.ravel()
flux_unc = t.std_dev.ravel()
energies = np.logspace(np.log10(1e-5),np.log10(20.0e6), 501)
plt.loglog(energies[:-1], flux)
plt.grid()
plt.xlabel(‘Energy [eV]’)
plt.ylabel(‘Flux [n/cm^2-sec]’)

ValueError: x and y must have same first dimension, but have shapes (500,) and (1000,)

@Laila I don’t see anything wrong with this code in principle. The dimensions of energies[:-1] and flux look to me like they should match. The only thing I can think of is that perhaps you were pulling in information from the wrong statepoint file.