Hi August,
This is a bug. Thank you for bringing it to our attention. It has been
fixed in the latest development-master tip, 9d2352e .
-- jeet
On 10/23/17 8:09 PM, August Guang wrote:
> Oh, I should add that I am using Dendropy 4.3.0 and Python 3.4.5.
>
> On Monday, October 23, 2017 at 8:07:47 PM UTC-4, August Guang wrote:
>
> I get an Attribute error when I try to pass in a Tree object to
> treesim.birth_death_tree using almost the exact code as described
> here in Building a tree in multiple stages under different
> conditions
> <
https://pythonhosted.org/DendroPy/primer/treesims.html#building-a-tree-in-multiple-stages-under-different-conditions>.
> Error is below:
>
> >>> tree = treesim.birth_death_tree(birth_rate=0.2,death_rate=0.2,max_time=6,assign_taxa=False,repeat_until_success=True,tree=tree)
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in <module>
>
> File
> "/Users/august/anaconda/envs/HIV/lib/python3.4/site-packages/dendropy/model/birthdeath.py",
> line 237, in birth_death_tree
>
> extinct_tips.append(nd)
>
> AttributeError: 'set' object has no attribute 'append'
>
>
> This occurs whether I pass in an empty tree, a tree with assigned
> taxa, or a tree without assigned taxa. I believe it to be a bug with
> the birth_death_tree function, as additionally the sample code
> provided in the 'Building a tree in multiple stages under different
> conditions' gives the same error.
>
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
dendropy-user...@googlegroups.com
> <mailto:
dendropy-user...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
--------------------------------------
Jeet Sukumaran
--------------------------------------
jeetsu...@gmail.com
--------------------------------------
Blog/Personal Pages:
http://jeetworks.org/
GitHub Repositories:
http://github.com/jeetsukumaran
Photographs (as stream):
http://www.flickr.com/photos/jeetsukumaran/
Photographs (by galleries):
http://www.flickr.com/photos/jeetsukumaran/sets/
--------------------------------------