Giter Site home page Giter Site logo

Comments (4)

AnkitRai avatar AnkitRai commented on May 18, 2024 1

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.

from clarifai-python.

rok-povsic avatar rok-povsic commented on May 18, 2024

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 image_id fields to some unique values. To allow having multiple images with same URL, set allow_dup_url to True, if this is what you want.

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)

from clarifai-python.

AnkitRai avatar AnkitRai commented on May 18, 2024

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:
{"status":{"code":11001,"description":"Invalid authentication token","details":"Empty or missing Authorization header","req_id":"xxxxxxxxxxx"},"inputs":[]}

P.S. removing the key with 'xxxxxxxxx'
Any idea?
Thanks

from clarifai-python.

rok-povsic avatar rok-povsic commented on May 18, 2024

@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

from clarifai-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.