Skip to content

Commit f5e1a0b

Browse files
authored
Reading text file updated to read with open
currently reading text file with TextSpitter returns a byte str which is difficult to handle. Let's just open file with open() and return text str.
1 parent 4d665d7 commit f5e1a0b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

TextSpitter/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ def DocxFileRead(self):
7272
return text
7373

7474
def TextFileRead(self):
75-
return self.get_contents()
75+
text = open(self.file).read()
76+
return text

0 commit comments

Comments
 (0)