Skip to content

Commit

Permalink
fix file encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
etern committed Jun 11, 2020
1 parent 4db16a2 commit 4d2f15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YEDDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,10 @@ def generateSequenceFile(self):
if not dlg.confirmed:
print("Operation canceled")
return
fileLines = open(self.fileName, 'r').readlines()
fileLines = open(self.fileName, 'r', encoding=self.file_encoding).readlines()
lineNum = len(fileLines)
new_filename = self.fileName.split('.ann')[0] + '.' + dlg.tag_scheme().lower()
seqFile = open(new_filename, 'w')
seqFile = open(new_filename, 'w', encoding=self.file_encoding)
for line in fileLines:
if len(line) <= 2:
seqFile.write('\n')
Expand Down

0 comments on commit 4d2f15c

Please sign in to comment.