Skip to content

Commit 881cc42

Browse files
committed
Fix tests on Windows
1 parent ec96652 commit 881cc42

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

superannotate/db/exports.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
from ..api import API
1515
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+
)
1820
from .projects import get_project_metadata
1921

2022
logger = logging.getLogger("superannotate-python-sdk")
@@ -141,7 +143,8 @@ def prepare_export(
141143
)
142144
res = response.json()
143145
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"]
145148
)
146149
return res["name"]
147150

@@ -181,7 +184,7 @@ def __upload_files_to_aws_thread(
181184
file = filepaths[i]
182185
try:
183186
relative_filename = file.relative_to(tmpdirname)
184-
s3_key = f'{folder_path}/{relative_filename}'
187+
s3_key = f'{folder_path}/{relative_filename.as_posix()}'
185188
to_s3.upload_file(str(file), s3_key)
186189
except Exception as e:
187190
logger.warning("Unable to upload to data server %s", e)
@@ -245,7 +248,7 @@ def download_export(
245248
f.extractall(tmpdirname)
246249
Path.unlink(filepath)
247250
files_to_upload = []
248-
for file in Path(tmpdirname).rglob("*"):
251+
for file in Path(tmpdirname).rglob("*.*"):
249252
if not file.is_file():
250253
continue
251254
files_to_upload.append(file)

0 commit comments

Comments
 (0)