HumanSignal / HumanSignal/label-studio-sdk

Timeout error at 10sec when importing task with large image

Open
#183 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
192
Forks
127
Avg merge
1d 18h
Merged PRs (30d)
1

Description

When importing a task with project.import_task('path_to_image'), there is a timeout of 10 seconds and large images (20Mb) cant upload. When using WebUI it works ok.

After modifying the timeout in the import_tasks function fom (10,600) to (100,600) it worked ok...

```
# try import from file
if not os.path.isfile(tasks):
raise LabelStudioException(f'Not found import tasks file {tasks}')
with open(tasks, mode='rb') as f:
response = self.make_request(
method='POST',
url=f'/api/projects/{self.id}/import',
files={'file': f},
params=params,
timeout=(100, 600), ## ORIGINAL: timeout=(10, 600),
)
```

I am confused because I would expect to have a 600s timeout for the upload but the limit is given by the first number (10 in the original code).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.