Here you are asserting that ALL the assets in the file must have the same occupancy period. But then our example file https://github.com/gem/oq-nrmllib/blob/master/examples/exposure-portfolio.xml is invalid.