# Strainphlan Version 4.0.6 Error AttributeError: 'Seq' object has no attribute 'replace'

**URL:** <https://forum.biobakery.org/t/strainphlan-version-4-0-6-error-attributeerror-seq-object-has-no-attribute-replace/4999>\
**Category:** StrainPhlAn\
**Created:** [March 21, 2023, 4:20pm UTC](https://forum.biobakery.org/t/strainphlan-version-4-0-6-error-attributeerror-seq-object-has-no-attribute-replace/4999 "2023-03-21T16:20:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trishla](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/trishla/32/2053_2.png) [@Trishla](https://forum.biobakery.org/u/Trishla)\
**Post date:** [March 21, 2023, 4:20pm UTC](https://forum.biobakery.org/t/strainphlan-version-4-0-6-error-attributeerror-seq-object-has-no-attribute-replace/4999/1 "2023-03-21T16:20:43Z")

</div>

With the new version of Strainphlan Version 4.0.6 we get the following error: Error AttributeError: ‘Seq’ object has no attribute ‘replace’.

line 34, in get\_sequence  
return SeqRecord(Seq(self.sequence[trim\_sequences:-trim\_sequences].replace(“\*”, “-”).replace(‘-’, ‘N’)), id=marker\_name, description=marker\_name)  
AttributeError: ‘Seq’ object has no attribute ‘replace’

Could you please help out with what is causing this error?

---

<div class="post-metadata">

**Author:** ![Trishla](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/trishla/32/2053_2.png) [@Trishla](https://forum.biobakery.org/u/Trishla)\
**Post date:** [March 21, 2023, 4:58pm UTC](https://forum.biobakery.org/t/strainphlan-version-4-0-6-error-attributeerror-seq-object-has-no-attribute-replace/4999/2 "2023-03-21T16:58:49Z")

</div>

Solved by changing version of Biopython

---

<div class="post-metadata">

**Author:** ![Stephen\_Smith](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/stephen_smith/32/1614_2.png) [@Stephen\_Smith](https://forum.biobakery.org/u/Stephen_Smith)\
**Post date:** [May 8, 2023, 4:40pm UTC](https://forum.biobakery.org/t/strainphlan-version-4-0-6-error-attributeerror-seq-object-has-no-attribute-replace/4999/3 "2023-05-08T16:40:48Z")

</div>

Which version of biopython did you use to fix the issue?
