# AttributeError: module 'openmc' has no attribute 'rectangular\_prism

**URL:** <https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-rectangular-prism/3728>\
**Category:** User Support\
**Created:** [December 12, 2023, 4:16am UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-rectangular-prism/3728 "2023-12-12T04:16:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Visionary](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@Visionary](https://openmc.discourse.group/u/Visionary)\
**Post date:** [December 12, 2023, 4:16am UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-rectangular-prism/3728/1 "2023-12-12T04:16:39Z")

</div>

Dear all,  
I have problems when run the pincell example.  
The version of my openmc is 0.14.1-dev.  
the related code is:  
box = openmc.rectangular\_prism(width=1.5, height=20,boundary\_type=‘reflective’)  
type(box)  
Error reported as follows:  
“Traceback (most recent call last): File “pincell.py”, line 43, in box = openmc.rectangular\_prism(width=1.5, height=20,boundary\_type=‘reflective’)  
AttributeError: module ‘openmc’ has no attribute ‘rectangular\_prism’”

---

<div class="post-metadata">

**Author:** ![telbardouni](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@telbardouni](https://openmc.discourse.group/u/telbardouni)\
**Post date:** [December 13, 2023, 8:19pm UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-rectangular-prism/3728/2 "2023-12-13T20:19:07Z")

</div>

In the latest release 0.14.0 of OpenMC, rectangular\_prism has been replaced by RectangularPrism attribute:

class openmc.model.RectangularPrism(width: float, height: float, axis: str = ‘z’, origin: Sequence[float] = (0.0, 0.0), boundary\_type: str = ‘transmission’, albedo: float = 1.0, corner\_radius: float = 0.0)
