Skip to content

Commit 8efe107

Browse files
committed
fix: Quote s3 path to handle special characters
1 parent ee0cb80 commit 8efe107

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templateflow/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,12 @@ def _datalad_get(filepath):
309309

310310
def _s3_get(filepath):
311311
from sys import stderr
312+
from urllib.request import quote
312313

313314
import requests
314315
from tqdm import tqdm
315316

316-
path = filepath.relative_to(TF_LAYOUT.root).as_posix()
317+
path = quote(filepath.relative_to(TF_LAYOUT.root).as_posix())
317318
url = f'{TF_S3_ROOT}/{path}'
318319

319320
print(f'Downloading {url}', file=stderr)

0 commit comments

Comments
 (0)