|
13 | 13 |
|
14 | 14 | from ..api import API |
15 | 15 | from ..common import annotation_status_str_to_int |
16 | | -from ..exceptions import (SABaseException, SAExistingExportNameException, |
17 | | - SANonExistingExportNameException) |
| 16 | +from ..exceptions import ( |
| 17 | + SABaseException, SAExistingExportNameException, |
| 18 | + SANonExistingExportNameException |
| 19 | +) |
18 | 20 | from .projects import get_project_metadata |
19 | 21 |
|
20 | 22 | logger = logging.getLogger("superannotate-python-sdk") |
@@ -141,7 +143,8 @@ def prepare_export( |
141 | 143 | ) |
142 | 144 | res = response.json() |
143 | 145 | logger.info( |
144 | | - "Prepared export %s for project %s (ID %s).", res['name'], project["name"], project["id"] |
| 146 | + "Prepared export %s for project %s (ID %s).", res['name'], |
| 147 | + project["name"], project["id"] |
145 | 148 | ) |
146 | 149 | return res["name"] |
147 | 150 |
|
@@ -181,7 +184,7 @@ def __upload_files_to_aws_thread( |
181 | 184 | file = filepaths[i] |
182 | 185 | try: |
183 | 186 | relative_filename = file.relative_to(tmpdirname) |
184 | | - s3_key = f'{folder_path}/{relative_filename}' |
| 187 | + s3_key = f'{folder_path}/{relative_filename.as_posix()}' |
185 | 188 | to_s3.upload_file(str(file), s3_key) |
186 | 189 | except Exception as e: |
187 | 190 | logger.warning("Unable to upload to data server %s", e) |
@@ -245,7 +248,7 @@ def download_export( |
245 | 248 | f.extractall(tmpdirname) |
246 | 249 | Path.unlink(filepath) |
247 | 250 | files_to_upload = [] |
248 | | - for file in Path(tmpdirname).rglob("*"): |
| 251 | + for file in Path(tmpdirname).rglob("*.*"): |
249 | 252 | if not file.is_file(): |
250 | 253 | continue |
251 | 254 | files_to_upload.append(file) |
|
0 commit comments