# Nvalid input provided: Argument 'cluster\_url' must be one of: \[\<class 'str'\>\], but got \<class 'NoneType'\>

**URL:** <https://forum.weaviate.io/t/nvalid-input-provided-argument-cluster-url-must-be-one-of-class-str-but-got-class-nonetype/2600>\
**Category:** Support\
**Created:** [June 3, 2024, 9:48am UTC](https://forum.weaviate.io/t/nvalid-input-provided-argument-cluster-url-must-be-one-of-class-str-but-got-class-nonetype/2600 "2024-06-03T09:48:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VIVEK](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vivek/32/1660_2.png) [@VIVEK](https://forum.weaviate.io/u/VIVEK)\
**Post date:** [June 3, 2024, 9:48am UTC](https://forum.weaviate.io/t/nvalid-input-provided-argument-cluster-url-must-be-one-of-class-str-but-got-class-nonetype/2600/1 "2024-06-03T09:48:44Z")

</div>

### Description

shows this error  
raise WeaviateInvalidInputError(  
weaviate.exceptions.WeaviateInvalidInputError: Invalid input provided: Argument ‘cluster\_url’ must be one of: [\<class ‘str’\>], but got \<class ‘NoneType’\>.  
(.venv) vpatwal@viveks-mbp awesome-moviate %

my code is :  
import weaviate  
import os

# Set these environment variables

URL = os.getenv(“https://my-sandbox-2-(and some characters).weaviate.network”)  
APIKEY = os.getenv(“https://my-sandbox-2-(and some characters).weaviate.network”)

# Connect to a WCS instance

client = weaviate.connect\_to\_wcs(  
cluster\_url=URL,  
auth\_credentials=weaviate.auth.AuthApiKey(APIKEY))

I’ve been trying since the morning but still can’t get it to work, the client doesn’t seem to work

---

<div class="post-metadata">

**Author:** ![Dirk](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dirk/32/46_2.png) [@Dirk](https://forum.weaviate.io/u/Dirk)\
**Post date:** [June 3, 2024, 10:46am UTC](https://forum.weaviate.io/t/nvalid-input-provided-argument-cluster-url-must-be-one-of-class-str-but-got-class-nonetype/2600/2 "2024-06-03T10:46:06Z")

</div>

> [@VIVEK](#):
>
> URL = os.getenv(“https://my-sandbox-2-(and some characters).weaviate.network”)  
> APIKEY = os.getenv(“https://my-sandbox-2-(and some characters).weaviate.network”)

You are looking for an environment variable with the name `https://my-sandbox-2-(and some characters).weaviate.network` which does not exist.

You need to do

```auto
URL = “https://my-sandbox-2-(and some characters).weaviate.network”
APIKEY = "KEY"

```

to correctly set the URL+api key. Just keep in mind to NOT commit your code anywhere with URL+API\_KEY set in there, so maybe look up how environment variables work and how to set them 🙂
