Skip to content

Commit 65f14b1

Browse files
virilorysteboe
authored andcommitted
Update kaggle_api_extended.py
Solves issue #173: kernels output fails if the kernel is creating output subfolders
1 parent e5ee250 commit 65f14b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kaggle/api/kaggle_api_extended.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,7 @@ def kernels_output(self, kernel, path, force=False, quiet=True):
20182018
outfiles.append(outfile)
20192019
download_response = requests.get(item['url'])
20202020
if force or self.download_needed(item, outfile, quiet):
2021+
os.makedirs(os.path.split(outfile)[0], exist_ok=True)
20212022
with open(outfile, 'wb') as out:
20222023
out.write(download_response.content)
20232024
if not quiet:

0 commit comments

Comments
 (0)