We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1eb390 commit a1c7a22Copy full SHA for a1c7a22
1 file changed
rosette/api.py
@@ -226,7 +226,8 @@ def load_document_file(self, path):
226
"""
227
self.use_multipart = True
228
self.file_name = path
229
- self.load_document_string(open(path, "rb").read())
+ with open(path, "rb") as f:
230
+ self.load_document_string(f.read())
231
232
def load_document_string(self, content_as_string):
233
"""Loads a string into the object.
0 commit comments