-
Notifications
You must be signed in to change notification settings - Fork 229
Description
writing Python code to automate for testing using Foundry-local. used sample code provided in the documentation to try and I keep failing at :
manager = FoundryLocalManager(alias)
output:------------------------------------------------------------------------------
🟢 Service is already running on http://127.0.0.1:58338/.
[foundry-local] | 2025-12-01 12:35:10 | WARNING | Foundry service did not start within the expected time. May not be running.
Traceback (most recent call last):
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry2.py", line 10, in
manager = FoundryLocalManager(alias)
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry_env\Lib\site-packages\foundry_local\api.py", line 48, in init
self.download_model(alias_or_model_id, device=device)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry_env\Lib\site-packages\foundry_local\api.py", line 312, in download_model
model_info = self.get_model_info(alias_or_model_id, device=device, raise_on_not_found=True)
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry_env\Lib\site-packages\foundry_local\api.py", line 182, in get_model_info
catalog = self.list_catalog_models()
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry_env\Lib\site-packages\foundry_local\api.py", line 136, in list_catalog_models
FoundryModelInfo.from_list_response(model) for model in self.httpx_client.get("/foundry/list")
^^^^^^^^^^^^^^^^^
File "C:\Users\mrao\OneDrive - Intel Corporation\WIP\Learning\FoundryAI\Foundry_env\Lib\site-packages\foundry_local\api.py", line 88, in httpx_client
raise RuntimeError("Httpx client is not set. Please start the service first.")
RuntimeError: Httpx client is not set. Please start the service first.