eaton-lab / tetrad

Phylogenetic inference using phylogenetic invariants and quartet joining
GNU General Public License v3.0
0 stars 2 forks source link

Attribute error when running Tetrad #12

Closed DiegoJ-Elias closed 4 months ago

DiegoJ-Elias commented 4 months ago

Hi, I just installed tetrad and I tried to run an analysis. The analysis started but after a few lines I get the following error (see below):

""" AttributeError: 'str' object has no attribute 'decode' """

Any help on how to solve this issue would be greatly appreciated

Best, Diego

File "/home/FM/delias/miniconda3/envs/tetrad/bin/tetrad", line 11, in sys.exit(main()) File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/main.py", line 287, in main CLI() File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/main.py", line 159, in init self.get_data() File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/main.py", line 233, in get_data load=self.load, File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/tetrad.py", line 178, in init self._init_seqarray() File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/tetrad.py", line 336, in _init_seqarray names = [i.decode() for i in io5["snps"].attrs["names"]] File "/home/FM/delias/miniconda3/envs/tetrad/lib/python3.7/site-packages/tetrad/tetrad.py", line 336, in names = [i.decode() for i in io5["snps"].attrs["names"]] AttributeError: 'str' object has no attribute 'decode'

isaacovercast commented 4 months ago

Did you install from conda? The conda package is a bit out of date. You can fix this by cloning the repository and installing the package by hand, like this (before you do this you need to change to a directory where you want the tetrad code to live):

git checkout https://github.com/eaton-lab/tetrad.git
pip install -e tetrad

If you are using conda you need to be sure you have activated the environment you want tetrad installed in.

isaacovercast commented 4 months ago

Let me know if it doesn't work for you.

DiegoJ-Elias commented 4 months ago

Hi Isaac, I did use conda to install tetrad previously.

Your suggestion of cloning the repo and installing it manually worked!

Thank you for your prompt response!

Best, Diego

On Mon, Jul 22, 2024 at 8:55 AM Isaac Overcast @.***> wrote:

Let me know if it doesn't work for you.

— Reply to this email directly, view it on GitHub https://github.com/eaton-lab/tetrad/issues/12#issuecomment-2243025917, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIO2GIUEPJPOJJSOPRYVFZ3ZNUFMXAVCNFSM6AAAAABLHNWR2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTGAZDKOJRG4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Diego J. Elías, Ph. D. Bass Postdoctoral Fellow Field Museum of Natural History 1400 S. DuSable Lake Shore Drive Chicago, IL 60605 Phone: 312-665-7722