# AttributeError: module 'openmc' has no attribute 'IndependentSource'

**URL:** <https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272>\
**Category:** User Support\
**Created:** [May 15, 2024, 1:04pm UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272 "2024-05-15T13:04:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thilagam](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@thilagam](https://openmc.discourse.group/u/thilagam)\
**Post date:** [May 15, 2024, 1:04pm UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272/1 "2024-05-15T13:04:43Z")

</div>

While using `mcnp_to_openmc` to convert one of my MCNP inputs to an OpenMC input, I encountered the error message ‘AttributeError: module ‘openmc’ has no attribute ‘IndependentSource’.’ I am using OpenMC version 0.13.2. Could someone please help me resolve this issue?"

---

<div class="post-metadata">

**Author:** ![Daedalus](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/daedalus/32/2928_2.png) [@Daedalus](https://openmc.discourse.group/u/Daedalus)\
**Post date:** [May 16, 2024, 2:44pm UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272/2 "2024-05-16T14:44:42Z")

</div>

IndependantSource is a version 0.14 method of neutron sourcing. You can either update or use a method available in 0.13.2.

---

<div class="post-metadata">

**Author:** ![thilagam](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@thilagam](https://openmc.discourse.group/u/thilagam)\
**Post date:** [May 17, 2024, 5:05am UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272/3 "2024-05-17T05:05:50Z")

</div>

Okay sir. Thank you for your kind and prompt response.

---

<div class="post-metadata">

**Author:** ![rohankhan](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/rohankhan/32/2405_2.png) [@rohankhan](https://openmc.discourse.group/u/rohankhan)\
**Post date:** [May 19, 2024, 11:34pm UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272/4 "2024-05-19T23:34:45Z")

</div>

The attribute _ **IndependentSource** _ is only available from version 0.14. Use _**openmc.Source()**_ instead. That should solve the problem.

---

<div class="post-metadata">

**Author:** ![thilagam](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@thilagam](https://openmc.discourse.group/u/thilagam)\
**Post date:** [May 20, 2024, 5:35am UTC](https://openmc.discourse.group/t/attributeerror-module-openmc-has-no-attribute-independentsource/4272/5 "2024-05-20T05:35:24Z")

</div>

Okay sir. Thank you for your kind response. It worked.
