SFR Errors: bad operand type for unary ~: 'HexagonalPrism' and main_in_u.plot(origin = (0,0,0), pixels=(500, 500), width = (30.,30.), color_by = 'material')

Hi everyone, I am working on the SFR modeling geometry for a research project but, I am having some difficulties. I am kinda new to openMC and im not sure if I am entirely running this the code correctly and if I should be running something in addition to the SFR geometry code that my research advisor told me to look at. I’ve been reading the documents that are on the openMC website and the discussion forum to get a better understanding, alas I am still getting error.

the first am I getting is this error: TypeError: bad operand type for unary ~: ‘HexagonalPrism’, for the following code:
out_in_assembly = openmc.Cell(cell_id=8, fill=sodium, region=~outer_in_surface and -top and +bottom)

I did research among this discussion forum and learned that the ~ should be for the entire region. this caused to change the location the tilde to be for the entire region, don’t know if this is correct or if there is something wrong with outer_in_surface. This is the new line:
out_in_assembly = openmc.Cell(cell_id=8, fill=sodium, region=~(outer_in_surface and -top and +bottom))

The next error is in the following cell, where I get this error: RuntimeError: OpenMC aborted unexpectedly. This is the line:
main_in_u.plot(origin = (0,0,0), pixels=(500, 500), width = (30.,30.), color_by = ‘material’)

I don’t know what the error is here and how to fix it.