b' prefix when exporting OrthoXML

38 weergaven
Naar het eerste ongelezen bericht

Geovanny Risco

ongelezen,
11 aug 2020, 10:06:2911-08-2020
aan The ETE toolkit

Hi all!

I'm using orthoXML from ete3 toolkit to parse homologous data but I'm encountering some troubles when exporting the orthoXML object. I get a b' prefix in all the names I passed by value. For instance, in the root of the resulting XML file I get the following:

<orthoXML origin=b'"MetaPhOrs"' version="1.000000">

I don't understand why. I just did the same as said in the docs but with the only difference that now I included the origin name. This is the line I have for that:

oxml = orthoxml.orthoXML(origin='MetaPhOrs', version="1.0")

The rest of the code it's exactly the same as found in the docs.
Reading on the source code I noticed that if I delete the part where the encoding is carried out (in the "outfile.write(.....)" lines),  the problem is solved. Why it's being done a encoding here?

Is there any other way of getting rid of that b' prefix?

Cheers,
Geovanny Risco.

dengzi...@gmail.com

ongelezen,
19 aug 2020, 10:48:4919-08-2020
aan The ETE toolkit
Hi,
please try the latest version of ete3.1.2 from https://github.com/etetoolkit/ete. And let me know if there's still this issue. Thanks!

Best,
Ziqi 

Geovanny Risco

ongelezen,
30 aug 2020, 16:38:3830-08-2020
aan The ETE toolkit
Hi,

Just tried and still doesn't work :(

With just removing all the ".encode(ExternalEncoding)" statements works fine. You should consider make this change.

Bests,
Geovanny.

Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten