SecretNotFoundError: Secret xxx does not exist

I have created the API key, but I can’t use it in colab when I run quick_start.ipynb.

/usr/local/lib/python3.11/dist-packages/google/colab/userdata.py in get(key)
66 raise TimeoutException(key)
67 if not resp.get(‘exists’, False):
—> 68 raise SecretNotFoundError(key)
69 if not resp.get(‘access’, False):
70 raise NotebookAccessError(key)

1 Like

In google collab, you need to create a variable for secret key , The variables should be accessible in the right sidebar (with the key :old_key: icon)

1 Like

Hi, I have a similar problem with running notebooks in Colab, but in my case I get the message “API key not valid. Please pass a valid API key.” even though this
is a key created through the web page and and added to Colab and referenced by the key name in the code.

I have tried to create a new key but got the same error.

Any advice on what to try?

BR, Arnold

_MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = “API key not valid. Please pass a valid API key.”
debug_error_string = “UNKNOWN:Error received from peer ipv4:74.125.26.95:443 {grpc_status:3, grpc_message:“API key not valid. Please pass a valid API key.”}”

Hi Arnold!

Hmm, do make sure you’ve copied the key correctly from https://deepmind.google.com/science/alphagenome/account/settings. If you’re still having issues, can you email alphagenome@google.com with the gmail account you’re having issues with and we’ll investigate further. Thanks!

Hi there, I see both my old and new key in the settings page and they look correct from when I created them.

As a test I wrote out the value of the keys as I was troubleshooting using below
code in the notebook and the printout was matched the key value.

userdata.get(‘ALPHA_GENOME_API_KEY’)

I also tried exchanging the userdata.get call with the actual key value but I got the same error.

The only thing I can think of is if I managed to enter one of the key values incorrect (even though I tripel checked) since I found no way of copy and paste the key value into Colabs Sectrets section.

Is there a way to import och copy the key to Colab, so I can check that?

BR, Arnold

Hi there, I just started the “quick_start” colab but got the same error of Arnold here. I generated the API KEY in “secrets” section, successfully loaded the model (dna_model…) but then when trying to investigate the lung sequence, a couple of code’s chunks below, I got: “API key not valid. Please pass a valid API key”.
Thanks in advance

Pietro

Hi both,

If you’re still having issues, can you email alphagenome@google.com from the account you registered with and include the API key that’s failing, and we’ll try and investigate.

Thanks!