Skip to content

Commit e4db008

Browse files
authored
Merge pull request #147 from effigies/fix/quote-urls
fix: Quote s3 path to handle special characters
2 parents ee0cb80 + e9510f3 commit e4db008

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.parse 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)