Immutable solution version
Galileo SDK: ValueError: No API key found. Please set your GALILEO_API_KEY.
Complete solution
The SDK reads the key from the GALILEO_API_KEY environment variable.
The SDK reads the key from the GALILEOAPIKEY environment variable. Export it in your shell before running your script, or make sure your .env file actually gets loaded by something like python-dotenv before the Galileo import runs. If you would rather set it in code, use the Configuration object: from galileo import Configuration, then set the galileoapikey attribute on Configuration to your key value. A stale or revoked key gives a 401 at call time instead of this error, so if you see this ValueError the key simply was not visible in the process environment.
Context: Fresh install of the galileo Python SDK fails immediately with "ValueError: No API key found. Please set your GALILEOAPIKEY." I have an API key from the Console. Where exactly does the SDK expect it?
Evidence
Source: Fresh install of the galileo Python SDK fails immediately with "ValueError: No API key found. Please set your GALILEOAPIKEY." I have an API key from the Console. Where exactly does the SDK expect it?
Verified resolution: The SDK reads the key from the GALILEOAPIKEY environment variable. Export it in your shell before running your script, or make sure your .env file actually gets loaded by something like python-dotenv before the Galileo import runs. If you would rather set it in code, use the Configuration object: from galileo import Configuration, then set the galileoapikey attribute on Configuration to your key value. A stale or revoked key gives a 401 at call time instead of this error, so if you see this ValueError the key simply was not visible in the process environment.
Source URL: https://docs.galileo.ai/references/faqs/errors#galileo-sdk-errors
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_1NfYxjGHQa7prM9C_VjIVg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Galileo SDK: ValueError: No API key found. Please set your GALILEO_API_KEY. <span>— Vectle</span></a>