# Error importing formdiagram function

**URL:** <https://forum.compas-framework.org/t/error-importing-formdiagram-function/172>\
**Category:** compas\_tna\
**Created:** [April 28, 2019, 6:36pm UTC](https://forum.compas-framework.org/t/error-importing-formdiagram-function/172 "2019-04-28T18:36:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiunana](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@kiunana](https://forum.compas-framework.org/u/kiunana)\
**Post date:** [April 28, 2019, 6:36pm UTC](https://forum.compas-framework.org/t/error-importing-formdiagram-function/172/1 "2019-04-28T18:36:58Z")

</div>

I’ve been using COMPAS 0.3.0 version and now updated to 0.5.2 version (working in pyCharm). The following worked fine in the previous version.

> from compas\_tna.diagrams import formdiagram

Now it gives the following error.

> File “C:/Users/isuru/PycharmProjects/TNA/venv/test1”, line 8, in   
> from compas\_tna.diagrams import formdiagram  
> File “C:\compas\_tna\src\compas\_tna\diagrams\__init_\_.py”, line 20, in   
> from .formdiagram import \*  
> File “C:\compas\_tna\src\compas\_tna\diagrams\formdiagram.py”, line 17, in   
> from compas.datastructures.mesh.mesh import TPL  
> ImportError: No module named mesh

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [April 28, 2019, 11:12pm UTC](https://forum.compas-framework.org/t/error-importing-formdiagram-function/172/2 "2019-04-28T23:12:38Z")

</div>

you seem to have an old version of `compas_tna`.

```auto
from compas.datastructures.mesh.mesh import TPL

```

should be

```auto
from compas.datastructures.mesh._mesh import TPL

```

the correct procedure for using `compas_tna` is to install it from a local clone of the repo that you keep relatively up to date…

first, clone `compas_tna` from [https://github.com/BlockResearchGroup/compas\_tna](https://github.com/BlockResearchGroup/compas_tna)

then, from the `compas_tna` root folder issue the following commands from the Anaconda Prompt:

```auto
pip install -r requirements-dev.txt

```

make sure that the correct `conda` environment is active (judging from some of your previous screenshots that would be “base”).

`compas_tna` will now be available in your Python environment.

to install for Rhino, do

```auto
python -m compas_rhino.uninstall -v 5.0
python -m compas_rhino.install -v 5.0 compas compas_rhino compas_tna 

```

admittedly, the docs are currently lagging a bit behind because of the high development pace. i will update them later this week…
