Skip to content

Commit 0e102ae

Browse files
JohannesBuchnerrysteboe
authored andcommitted
fix Python 2 error: 'file' object has no attribute 'readable' (issue #115)
1 parent d427f86 commit 0e102ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kaggle/api/kaggle_api_extended.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2353,7 +2353,7 @@ def upload_complete(self, path, url, quiet):
23532353
unit_scale=True,
23542354
unit_divisor=1024,
23552355
disable=quiet) as progress_bar:
2356-
with open(path, 'rb', buffering=0) as fp:
2356+
with io.open(path, 'rb', buffering=0) as fp:
23572357
reader = TqdmBufferedReader(fp, progress_bar)
23582358
session = requests.Session()
23592359
retries = Retry(total=10, backoff_factor=0.5)

0 commit comments

Comments
 (0)