Cannot Pass URL with %20 in custom vision API

Garen Kwan 1 Reputation point

I have deployed a custom vision model and it works when passing a request to an endpoint:
the result is fine and I get a response as expected.

However, if the url has a space in it denoted by a "%20" example:
I get the following response:
"code": "BadRequestImageUrl",
"message": "Invalid url: 2.jpg"

it seems to me that the problem is with custom vision not being able to parse this url.
i have also tried passing 2.jpg for the image url but it fails too.

the spaces are part of the url and cannot be removed, how can i resolve this?

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
341 questions
Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
233 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GiftA-MSFT 11,161 Reputation points

    Hi, try renaming the file (remove space) or apply the following encoding testimage+2.jpg.

    --- *kindly accept answer if the information provided helps, this helps the community find answers faster.*

    0 comments No comments

  2. Garen Kwan 1 Reputation point

    Hi, afraid I cannot do that.
    Also, I think I misconstructed the problem. I could be facing authentication issues when trying to link the custom vision endpoint to a file saved using forms.

    0 comments No comments