# Trying to access via API, but seeing an error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-access-via-api-but-seeing-an-error%2F48107%3E%5C
**Category:** Spaces\
**Created:** [July 25, 2023, 3:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-access-via-api-but-seeing-an-error%2F48107 "2023-07-25T15:25:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![faalbane](https://avatars.discourse-cdn.com/v4/letter/f/13edae/32.png) [@faalbane](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffaalbane)%5C
**Post date:** [July 25, 2023, 3:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-access-via-api-but-seeing-an-error%2F48107%2F1 "2023-07-25T15:25:11Z")

</div>

Greetings. Our team has duplicated this space: [Grounded Segment Anything - a Hugging Face Space by yizhangliu](https://huggingface.co/spaces/yizhangliu/Grounded-Segment-Anything)

The code is identical. The only difference is that our space is private.

We’re trying to call this space/code as an API. When we click on the ‘API’ button on the bottom of the space, we see instructions.

When I try to ping via Google Colab (py), we see an error:

ValueError  
…  
----\> 4 result = client.predict(  
5 “\<actual image URL, removed to not trip 2 link limit\>”, # str (filepath or URL to image) in ‘Upload’ Image component  
6 “Howdy!”, # str in ‘Detection Prompt[To detect multiple objects, seperating each name with ‘.’, like this: cat . dog . chair]’ Textbox component

4 frames  
/usr/local/lib/python3.10/dist-packages/gradio\_client/client.py in \_predict(\*data)  
674 result = utils.synchronize\_async(self.\_ws\_fn, data, hash\_data, helper)  
675 if “error” in result:  
 → 676 raise ValueError(result[“error”])  
677 else:  
678 response = requests.post(

ValueError: None

Here is our Google Colab notebook: [Google Colab](https://colab.research.google.com/drive/1zBXEi_SYCIyOZsx2qAR9H-EO_ifFFekG?usp=sharing)

Can anyone assist in finding why it’s not working?

---

<div class="post-metadata">

**Author:** ![DJStomp](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/djstomp/32/39071_2.png) [@DJStomp](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDJStomp)%5C
**Post date:** [July 31, 2023, 3:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-access-via-api-but-seeing-an-error%2F48107%2F2 "2023-07-31T03:07:26Z")

</div>

I can confirm, having the same problem

```auto
/usr/local/lib/python3.10/dist-packages/gradio_client/client.py in _predict(*data)
    816 result = utils.synchronize_async(self._ws_fn, data, hash_data, helper)
    817 if "error" in result:
--> 818 raise ValueError(result["error"])
    819 else:
    820 response = requests.post(

ValueError: None

```

---

<div class="post-metadata">

**Author:** ![binqiangliu](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@binqiangliu](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbinqiangliu)%5C
**Post date:** [September 27, 2023, 5:43am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-access-via-api-but-seeing-an-error%2F48107%2F3 "2023-09-27T05:43:11Z")

</div>

Have you solved this problem? Facing this problem as well. Confused for almost a week ☹
