I am getting the following error when I run my jupyter notebook for Multilingual Search Code:
HTTPError Traceback (most recent call last)
File /usr/local/lib/python3.9/site-packages/weaviate/connect/connection.py:650, in Connection.wait_for_weaviate(self, startup_period)
649 try:
→ 650 requests.get(ready_url, headers=self._get_request_header()).raise_for_status()
651 return
File /usr/local/lib/python3.9/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
1020 if http_error_msg:
→ 1021 raise HTTPError(http_error_msg, response=self)
HTTPError: 500 Server Error: Internal Server Error for url: http://jupyter-api-proxy.internal.dlai/rev-proxy/weaviate/v1/.well-known/ready
The above exception was the direct cause of the following exception:
WeaviateStartUpError Traceback (most recent call last)
Cell In[2], line 8
4 _ = load_dotenv(find_dotenv()) # read local .env file
6 auth_config = weaviate.auth.AuthApiKey(api_key=os.getenv(“WEAVIATE_API_KEY”))
----> 8 client = weaviate.Client(
9 url=os.getenv(“WEAVIATE_API_URL”),
10 auth_client_secret=auth_config,
11 additional_headers={
12 “X-Cohere-Api-Key”: os.getenv(“COHERE_API_KEY”),
13 “X-Cohere-BaseURL”: os.getenv(“CO_API_URL”)
14 }
15 )
17 client.is_ready() #check if True
File /usr/local/lib/python3.9/site-packages/weaviate/client.py:150, in Client._init_(self, url, auth_client_secret, timeout_config, proxies, trust_env, additional_headers, startup_period, embedded_options, additional_config)
147 config = Config() if additional_config is None else additional_config
148 url, embedded_db = self.__parse_url_and_embedded_db(url, embedded_options)
→ 150 self._connection = Connection(
151 url=url,
152 auth_client_secret=auth_client_secret,
153 timeout_config=_get_valid_timeout_config(timeout_config),
154 proxies=proxies,
155 trust_env=trust_env,
156 additional_headers=additional_headers,
157 startup_period=startup_period,
158 embedded_db=embedded_db,
159 grcp_port=config.grpc_port_experimental,
160 connection_config=config.connection_config,
161 )
162 self.classification = Classification(self._connection)
163 self.schema = Schema(self._connection)
File /usr/local/lib/python3.9/site-packages/weaviate/connect/connection.py:166, in Connection._init_(self, url, auth_client_secret, timeout_config, proxies, trust_env, additional_headers, startup_period, connection_config, embedded_db, grcp_port)
164 if startup_period is not None:
165 _check_positive_num(startup_period, “startup_period”, int, include_zero=False)
→ 166 self.wait_for_weaviate(startup_period)
168 self._create_sessions(auth_client_secret)
169 self._add_adapter_to_session(connection_config)
File /usr/local/lib/python3.9/site-packages/weaviate/connect/connection.py:653, in Connection.wait_for_weaviate(self, startup_period)
651 return
652 except (RequestsHTTPError, RequestsConnectionError) as error:
→ 653 raise WeaviateStartUpError(
654 f"Weaviate did not start up in {startup_period} seconds. Either the Weaviate URL {self.url} is wrong or Weaviate did not start up in the interval given in ‘startup_period’."
655 ) from error
WeaviateStartUpError: Weaviate did not start up in 5 seconds. Either the Weaviate URL http://jupyter-api-proxy.internal.dlai/rev-proxy/weaviate is wrong or Weaviate did not start up in the interval given in ‘startup_period’.
The cell with the error is:
import weaviate, os, json
import openai
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file
auth_config = weaviate.auth.AuthApiKey(api_key=os.getenv(“WEAVIATE_API_KEY”))
client = weaviate.Client(
url=os.getenv(“WEAVIATE_API_URL”),
auth_client_secret=auth_config,
additional_headers={
“X-Cohere-Api-Key”: os.getenv(“COHERE_API_KEY”),
“X-Cohere-BaseURL”: os.getenv(“CO_API_URL”)
}
)
client.is_ready() #check if True
Please let me know how to resolve the issue or what can be done at your end
Thank you!