[med-svn] [Git][med-team/bcalm][master] Enforce encoding. Maybe this will work for those getting the error?

Shayan Doust gitlab at salsa.debian.org
Sat Sep 28 13:23:22 BST 2019



Shayan Doust pushed to branch master at Debian Med / bcalm


Commits:
d2193a06 by Shayan Doust at 2019-09-28T01:29:52Z
Enforce encoding. Maybe this will work for those getting the error?

- - - - -


1 changed file:

- debian/missing-sources/compare_fasta.py


Changes:

=====================================
debian/missing-sources/compare_fasta.py
=====================================
@@ -12,9 +12,9 @@ def normalize(seq):
 
 def read_seqs(fasta):
     seqs = set()
-    for  line in open(fasta):
+    for  line in open(fasta, encoding="utf8", errors='ignore'):
         if line[0] == '>': continue
-        seqs.add(normalize(str(line.strip())))
+        seqs.add(normalize(str(line).strip()))
     return seqs
 
 s1 = read_seqs(fasta1)



View it on GitLab: https://salsa.debian.org/med-team/bcalm/commit/d2193a067d2856d50d8fe917a7ff2a9393e88a79

-- 
View it on GitLab: https://salsa.debian.org/med-team/bcalm/commit/d2193a067d2856d50d8fe917a7ff2a9393e88a79
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190928/0cd416af/attachment.html>


More information about the debian-med-commit mailing list