question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python SDK - create_images_from_urls - CustomVisionErrorException: No image urls provided

See original GitHub issue
  • Package Name: azure-cognitiveservices-vision-customvision
  • Package Version: azure-cognitiveservices-vision-customvision==3.1.0 azure-common==1.1.28 azure-core==1.23.1 azure-storage-blob==12.11.0
  • Operating System: MacOs Monterrey 12.3.1
  • Python Version: Python 3.8.13

Describe the bug When trying to upload a picture using ImageUrlCreateBatch I get the error: CustomVisionErrorException: No image urls provided. It fails with all image urls.

To Reproduce

After creating the trainer and project I try to upload any picture using it create_images_from_urls:

credentials = ApiKeyCredentials(in_headers={"Training-key": training_key})
trainer = CustomVisionTrainingClient(ENDPOINT, credentials)
project = trainer.create_project(project_name, domain_id = obj_detection_domain, classification_type = classification_type)
# the above is just fyi

original_image_uri = 'https://blog.hubspot.com/hubfs/parts-url.jpg'
tag_ids            = ['tag1']
entry              = ImageUrlCreateEntry(url=original_image_uri)

batch = ImageUrlCreateBatch(images=[entry], tag_ids=tag_ids)
trainer.create_images_from_urls(project.id, batch)

---------------------------------------------------------------------------
CustomVisionErrorException                Traceback (most recent call last)
/var/folders/d1/3ccrqy3947q9983ktch0tthc0000gn/T/ipykernel_60740/1079157937.py in <cell line: 1>()
----> 1 trainer.create_images_from_urls(project.id, batch, raw= True)

~/opt/anaconda3/envs/sgsApiTraining/lib/python3.8/site-packages/azure/cognitiveservices/vision/customvision/training/operations/_custom_vision_training_client_operations.py in create_images_from_urls(self, project_id, batch, custom_headers, raw, **operation_config)
   1895 
   1896         if response.status_code not in [200, 207]:
-> 1897             raise models.CustomVisionErrorException(self._deserialize, response)
   1898 
   1899         deserialized = None

CustomVisionErrorException: No image urls provided

The following also fails with the same error:

    entry              = ImageUrlCreateEntry(url=original_image_uri, tag_ids=tag_ids)
    
    batch = ImageUrlCreateBatch(images=[entry])
    trainer.create_images_from_urls(project.id, batch)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SaurabhSharma-MSFTcommented, Apr 22, 2022

@agonzalez-mob I am seeing the same behavior and checking internally on the same. I will get back to you with my findings.

Thanks Saurabh

1reaction
mccoypcommented, Apr 15, 2022

Hi @agonzalez-mob, thank you for opening an issue! I’m tagging some folks who should be able to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Azure Custom Vision SDK - CustomVisionErrorException
When trying to upload a picture using ImageUrlCreateBatch I get the error: CustomVisionErrorException: No image urls provided . It fails with ...
Read more >
Create Images From Urls - REST API (Azure Cognitive Services
Operations. Create Images From Urls. Add the provided images urls to the set of training images.
Read more >
Azure Cognitive Services Computer Vision SDK for Python
You can use Computer Vision in your application to: Analyze images for insight. Extract text from images. Generate thumbnails. Looking for more documentation?...
Read more >
Image Transformations for Developers - Cloudinary
The Transformation URL API Reference details every transformation parameter available for both images and videos.
Read more >
Create a model with Azure Custom Vision and Python
So far no images have been added to the Azure Custom Vision service, ... Its then available in a prediction API and ready...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found