I meet an Error when the annotation is almost finished, during writing DDBJ files.
Traceback (most recent call last):
File "/pub28/yan/miniconda2/envs/bioinfo/bin/dfast", line 284, in <module>
pipeline.execute()
File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/pipeline.py", line 61, in execute
self.ddbj.create_submission_file()
File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/utils/ddbj_submission.py", line 65, in create_submission_file
create_ddbj_submission_file(self.genome, self.metadata, ann_file, fasta_file, self.verbosity)
File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/utils/ddbj_submission.py", line 165, in create_ddbj_submission_file
metadata = Metadata(dict_metadata)
File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/utils/metadata_util.py", line 118, in __init__
for line in open(self.__class__.METADATA_DEFINITION_FILE):
File "/pub28/yan/miniconda2/envs/bioinfo/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 21: ordinal not in range(128)
I solved this error by manually add encoding="utf-8" to File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/utils/metadata_util.py", line 118, make it:
for line in open(self.__class__.METADATA_DEFINITION_FILE, decoding="utf-8"):
I'm not sure is it a proper way. Make a note for Arthur and for anyone else meet the same error.
Thank you for reporting an error.
I fixed this in ver1.2.7 by adding encoding="utf-8" option, although this may not work in Py2.7 because encoding option is not available in py2.7
I meet an Error when the annotation is almost finished, during writing DDBJ files.
I solved this error by manually add
encoding="utf-8"
to File "/pub28/yan/miniconda2/envs/bioinfo/opt/dfast-1.2.6/dfc/utils/metadata_util.py", line 118, make it:I'm not sure is it a proper way. Make a note for Arthur and for anyone else meet the same error.