Skip to content

Commit 94cee69

Browse files
authored
Fix method to retrieve attributes from file object
1 parent 6a1bc35 commit 94cee69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasets/utils/file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def read_with_retries(*args, **kwargs):
856856
orig_file_obj = file_obj
857857
file_obj = io.RawIOBase()
858858
file_obj.read = read_with_retries
859-
file_obj.__getattr__ = lambda _, attr: getattr(orig_file_obj, attr)
859+
file_obj.__getattribute__ = lambda _, attr: getattr(orig_file_obj, attr)
860860
return file_obj
861861

862862

0 commit comments

Comments
 (0)