Closed tristanbrown closed 6 months ago
I see, the parent method is already wrapped, but the metaclass cannot tell, so it tries to wrap it again. The interim solution is to remove fasta.RAW_HEADER_KEY
from the return value of fasta.UniProt.parser(self, header)
before returning it.
The longer term solution would be to modify the check in the _add_raw_field
wrapper so that if the fasta.RAW_HEADER_KEY
key is present, if its value is
the same as the string we would assign to it otherwise, don't throw an error.
Thank you @tristanbrown for reporting and @mobiusklein for your suggestion, I tried implementing it in https://github.com/levitsky/pyteomics/commit/f9d7f7c83d351147a84df3d8c7923a9cfda397f5.
@tristanbrown could you try the latest master
and see if it works for you?
@levitsky Yes, the latest master
branch fixes my issue. Thanks!
After the release of https://github.com/levitsky/pyteomics/pull/120 in v4.6.2, I now get the following error traceback when trying to parse fastas:
MyUniProt
is just a custom parser with a more robust regex pattern:This parsing works without a problem in v4.6.1.