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

An additional slash at the end of the hostname makes some operations unworkable #5046

Closed
2 tasks done
jcorrochanoj opened this issue Oct 5, 2022 · 2 comments · Fixed by #5057
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@jcorrochanoj
Copy link

jcorrochanoj commented Oct 5, 2022

My actions before raising this issue

An additional slash at the end of the hostname makes some operations unworkable.

Current Behaviour

Using some operations from high-level API does not work when an additional slash at the end of the hostname is added. For example:

  • download_backup
  • export_dataset
  • create_task_from_data

However, other operations like downloading independent images (download_frames) or getting information about projects or tasks work properly.

Steps to Reproduce (for bugs)

Using the following code, having a slash at the end of the hostname, can be used to reproduce the error

from cvat_sdk import make_client, models
from cvat_sdk.core.proxies.tasks import ResourceType, Task

with make_client(host="http://localhost:8080/") as client:
    # Authorize using the basic auth
    client.login(('user', 'password'))

    # Models are used the same way as in the layer 1
    task_spec = {
        "name": "example task 2",
        "labels": [
            {
                "name": "car",
                "color": "#ff00ff",
                "attributes": [
                    {
                        "name": "a",
                        "mutable": True,
                        "input_type": "number",
                        "default_value": "5",
                        "values": ["4", "5", "6"],
                    }
                ],
            }
        ]
    }
    task = client.tasks.create_from_data(
        spec=task_spec,
        resource_type=ResourceType.LOCAL,
        resources=["image00200.png", "image01000.png"],
    )

Context

This is a minor bug that led me to try many other things before I saw where the problem was. The solution should be simple and I believe it could avoid a lot of headaches.

Your Environment

  • Git hash commit: ba4175b
  • Docker version docker version: 19.03.13-ce
  • Operating System and version: Linux (AWS EC2 Amazon Linux)
@bsekachev
Copy link
Member

@zhiltsov-max Do you have any ideas here?

@zhiltsov-max
Copy link
Contributor

Hi, thanks for reporting the problem. Yes, looks like something to be fixed.

@zhiltsov-max zhiltsov-max added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants