Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Generative AI with Vertex AI: Prompt Design Self placed lab issue

The instruction shared to complete the Self-placed AL lab is failing with permission error. (SS below). Not sure how to fix it as permisson is managed by google itself.

@step: "Prompt engineering best practices" | Be concise

Error: 

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.PERMISSION_DENIED
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.PERMISSION_DENIED
	details = "Permission denied on resource project [qwiklabs-gcp-03-cc7cebacc795]."
	debug_error_string = "UNKNOWN:Error received from peer ipv4:74.125.199.95:443 {created_time:"2024-05-29T03:38:17.217803747+00:00", grpc_status:7, grpc_message:"Permission denied on resource project [qwiklabs-gcp-03-cc7cebacc795]."}"
>
details = "Permission denied on resource project [qwiklabs-gcp-03-cc7cebacc795]." debug_error_string = "UNKNOWN:Error received from peer ipv4:74.125.199.95:443 {created_time:"2024-05-29T03:38:17.217803747+00:00", grpc_status:7, grpc_message:"Permission denied on resource project [qwiklabs-gcp-03-cc7cebacc795]."}" >

 Thank you..!

0 3 1,794
3 REPLIES 3

Make sure there are no spaces or any special characters when you copied the ProjectID (qwiklabs-gcp-03-cc7cebacc795) into the notebook. When you copy the ProjectID into clipboard and try to paste it, it introduces some spaces and extra characters which causes this issue. 

I am having the same error and spent several hours trying to debug it. I will try again and check for any spaces I might have copied mistakenly.

Remove the square brackets from the project id.

Should look something like this

import vertexai

PROJECT_ID = "qwiklabs-gcp-04-1c30f3887a61" # @PARAM {type:"string"}
REGION = "us-east4" # @PARAM {type:"string"}

vertexai.init(project=PROJECT_ID, location=REGION)