# Error when running export2graphlan.py

**URL:** <https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103>\
**Category:** GraPhlAn\
**Created:** [October 1, 2020, 10:27am UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103 "2020-10-01T10:27:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elenu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/elenu/32/421_2.png) [@elenu](https://forum.biobakery.org/u/elenu)\
**Post date:** [October 1, 2020, 10:27am UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103/1 "2020-10-01T10:27:40Z")

</div>

Dear all,  
I tried to run this code from the tutorial:  
`$ export2graphlan.py --skip_rows 1,2 -i merged_abundance_table.txt --tree merged_abundance.tree.txt --annotation merged_abundance.annot.txt --most_abundant 100 --abundance_threshold 1 --least_biomarkers 10 --annotations 5,6 --external_annotations 7 --min_clade_size 1`

I obtained a message that I do not understand. Is there a problem with my code or files (successfully obtained following the tutorial)?

```auto
Traceback (most recent call last):
  File "/home/me/.local/bin/export2graphlan.py", line 11, in <module>
    from hclust2 import DataMatrix
  File "/home/me/.local/bin/hclust2.py", line 13, in <module>
    import pandas as pd
  File "/home/me/.local/lib/python2.7/site-packages/pandas/ __init__.py", line 55, in <module>
    from ._version import get_versions
  File "/home/me/.local/lib/python2.7/site-packages/pandas/_version.py", line 9, in <module>
    import json
ImportError: /home/me/.local/lib/python2.7/site-packages/pandas/json.so: undefined symbol: Buffer_AppendShortHexUnchecked

```

I have made sure I was using Python 2.7 by:

```auto
$ conda create -n python2p7 python=2.7
$ conda activate python2p7

```

Then, I ran it again and it returned this message:

```auto
/home/me/.local/lib/python2.7/site-packages/pandas/hashtable.so: undefined symbol: pyobject_cmp
Traceback (most recent call last):
  File "/home/me/anaconda3/envs/python2p7/bin/export2graphlan.py", line 11, in <module>
    from hclust2 import DataMatrix
  File "/home/me/anaconda3/envs/python2p7/bin/hclust2.py", line 13, in <module>
    import pandas as pd
  File "/home/me/.local/lib/python2.7/site-packages/pandas/ __init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: /home/me/.local/lib/python2.7/site-packages/pandas/hashtable.so: undefined symbol: pyobject_cmp

```

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![aaron\_walsh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aaron_walsh/32/554_2.png) [@aaron\_walsh](https://forum.biobakery.org/u/aaron_walsh)\
**Post date:** [January 13, 2021, 3:23pm UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103/2 "2021-01-13T15:23:24Z")

</div>

Hey Elanu,

Sorry for the delayed response. Can you try to reinstall export2graphlan using the following instructions? First, check your version of conda using:

`conda --version`

If your conda version is \<4.6, run:

`conda install -c biobakery export2graphlan --force`

Alternatively, if your conda version is \>4.6, run:

`conda install -c biobakery export2graphlan --force-reinstall`

Let me if reinstalling export2graphlan solves your issue. Hope this helps.

Regards,  
Aaron.

---

<div class="post-metadata">

**Author:** ![elenu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/elenu/32/421_2.png) [@elenu](https://forum.biobakery.org/u/elenu)\
**Post date:** [September 2, 2021, 5:08pm UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103/3 "2021-09-02T17:08:46Z")

</div>

Dear Aaron.

Sorry for the late response. Thank you for your answer. At the end I reinstalled the Linux system, but I’m having an even earlier issue with the first plot of the Wiki’s example: the nodes appear aligned and half-overlapped (I oppened another Issue for that: [Nodes appear aligned](https://forum.biobakery.org/t/nodes-appear-aligned/2549)).

Seems I have no luck with graphlan yet. I’ll keep trying.

I will consider your answer regarding export2graphlan.py as soon I fix this new issue.

Thank you!

Regards,  
Elena

---

<div class="post-metadata">

**Author:** ![aaron\_walsh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aaron_walsh/32/554_2.png) [@aaron\_walsh](https://forum.biobakery.org/u/aaron_walsh)\
**Post date:** [September 10, 2021, 3:50pm UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103/4 "2021-09-10T15:50:01Z")

</div>

Hi,

No problem. Thanks for getting in touch. Can you send me the command you are passing to GraPhlAn? Also, could I get a copy of the tree and annotation files? I can try to reproduce the error on my end.

Regards,  
Aaron.

---

<div class="post-metadata">

**Author:** ![elenu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/elenu/32/421_2.png) [@elenu](https://forum.biobakery.org/u/elenu)\
**Post date:** [September 11, 2021, 9:00am UTC](https://forum.biobakery.org/t/error-when-running-export2graphlan-py/1103/5 "2021-09-11T09:00:31Z")

</div>

Hi,

Of course, the command I’m passing is this one:

```auto
graphlan.py guide.txt step_0.png --dpi 300 --size 3.5

```

Here you have the tree file I tried for the plot I shared in my previous reply:  
[guide.txt](https://forum.biobakery.org/uploads/short-url/s86ZMIQT8NGWY6xCI7Po0ohJYjE.txt) (1.9 KB)

I didn’t tried again to add the annotations because this time I’ve got stuck in the first step.

Thank you!

Regards,  
Elena
