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

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

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

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 :slight_smile: