-
Notifications
You must be signed in to change notification settings - Fork 118
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
Bulk input throwing an error #82
Comments
Hi @AnkitRai , In your case I suspect that the error occurs either because the image ID is already taken or the URL has already been added. To fix the first case, change the Changing your two image lines to the lines below does both and should fix your problem. img1 = ClImage(url="https://samples.clarifai.com/metro-north.jpg", image_id="train2", allow_dup_url=True)
img2 = ClImage(url="https://samples.clarifai.com/puppy.jpeg", image_id="puppy2", allow_dup_url=True) |
Thanks @rok-povsic for your response. That did work with the sample examples. But it is still showing the error when running the same script on my images. Please see below the POST message I'm getting: P.S. removing the key with 'xxxxxxxxx' |
@AnkitRai If the images are available (online) at the specified URLs, this should not happen. Could you provide a sample URL where this happens so I can double check it? However I don't believe this is the reason for the error. Could you double check your API key and make sure that you're using the right ClarifaiApp object/variable (if you maybe have two of them, or something like that)? Thanks |
Thanks @rok-povsic for your response. I figured it out, it's with the duplicate image_id in the image data. So I can run it now. |
Hi, I'm using the following code to create bulk input:
from clarifai.rest import ClarifaiApp
from clarifai.rest import Image as ClImage
app = ClarifaiApp(api_key='YOUR_API_KEY')
img1 = ClImage(url="https://samples.clarifai.com/metro-north.jpg", image_id="train1")
img2 = ClImage(url="https://samples.clarifai.com/puppy.jpeg", image_id="puppy1")
app.inputs.bulk_create_images([img1, img2])
However, keep getting error.
The text was updated successfully, but these errors were encountered: