Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout error at 10sec when importing task with large image #183

Open
fares-ipgp opened this issue Feb 21, 2024 · 1 comment
Open

Timeout error at 10sec when importing task with large image #183

fares-ipgp opened this issue Feb 21, 2024 · 1 comment

Comments

@fares-ipgp
Copy link

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

@ww-insight
Copy link

Same problem. Would be nice to pass timeout as an optional argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants