diff --git a/python/obitools3/format/header.pyx b/python/obitools3/format/header.pyx index 9e24106..8b15d8c 100755 --- a/python/obitools3/format/header.pyx +++ b/python/obitools3/format/header.pyx @@ -6,7 +6,7 @@ from obitools3.dms.capi.obiview cimport NUC_SEQUENCE_COLUMN, \ QUALITY_COLUMN, \ COUNT_COLUMN -from obitools3.utils cimport str2bytes +from obitools3.utils cimport str2bytes, bytes2str_object from obitools3.dms.column.column cimport Column_line @@ -63,7 +63,7 @@ cdef class HeaderFormat: if type(value) == Column_line: value = value.bytes() else: - value = str2bytes(str(value)) # TODO ugly but how else? + value = str2bytes(str(bytes2str_object(value))) # genius programming if value is not None: lines.append(k + b"=" + value + b";")