# Problem creating h5m file from pymoab Core object

**URL:** https://openmc.discourse.group/t/problem-creating-h5m-file-from-pymoab-core-object/2195
**Category:** User Support
**Created:** [July 21, 2022, 9:12am UTC](https://openmc.discourse.group/t/problem-creating-h5m-file-from-pymoab-core-object/2195 "2022-07-21T09:12:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LukeLabrie](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@LukeLabrie](https://openmc.discourse.group/u/LukeLabrie)
#### Post date: [July 21, 2022, 9:12am UTC](https://openmc.discourse.group/t/problem-creating-h5m-file-from-pymoab-core-object/2195/1 "2022-07-21T09:12:33Z")

</div>

We’ve been working on a cad to openmc [toolchain](https://github.com/openmsr/CAD_to_openMC) without using cubit, which ultimately makes use of the pymoab `Core` object to build the h5m structure for an openmc simulation.

Currently getting the the following MOAB error on a test run:

```auto
--------------------- Error Message ------------------------------------ 
MOAB ERROR: 
Failed to setup problem indices! 
MOAB ERROR: 
init_OBBTree() line 652 in DagMC.cpp 
MOAB ERROR: init_dagmc() line 135 in dagmc.cpp  
WARNING: 
/home/luke/git/are/h5m_files/ARE.h5m is not an hdf5 file but a datapath was prodided!

```

We’re using the pymoab `Core.write_file()` method to write the h5m file. Anyone familiar with moab know what could be causing this?

Thanks,  
Luke

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [July 21, 2022, 3:25pm UTC](https://openmc.discourse.group/t/problem-creating-h5m-file-from-pymoab-core-object/2195/2 "2022-07-21T15:25:28Z")

</div>

Looking at the source code for Pyne, it appears that this error message is suggesting the file is not in HDF5 format.

> <https://github.com/pyne/pyne/blob/800c75a6099f81ac73460166aea936dea4835f00/src/material_library.cpp#L28>

Also I shall try to fix that typo in the error message

---

<div class="post-metadata">

### Author: ![LukeLabrie](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@LukeLabrie](https://openmc.discourse.group/u/LukeLabrie)
#### Post date: [July 22, 2022, 2:38pm UTC](https://openmc.discourse.group/t/problem-creating-h5m-file-from-pymoab-core-object/2195/3 "2022-07-22T14:38:10Z")

</div>

Thanks Jonathan, that was indeed the issue. Moab was writing a .vtk file instead of an .h5m file. I didn’t notice at first because the extension was still .h5m. Fixed by including the `ENABLE_HDF5` flag and recompiling moab.
