[Tutor] The resource 'projects/gcloud-java-examples' was not found

Alan Gauld alan.gauld at yahoo.co.uk
Tue Apr 5 05:24:16 EDT 2022


On 05/04/2022 03:59, Kaushal Shriyan wrote:

> https://github.com/alfonsof/google-cloud-python-examples. Currently, I am
> encountering the issue.
> 
> line 937, in execute
>     raise HttpError(resp, content, uri=self.uri)
> googleapiclient.errors.HttpError: <HttpError 404 when requesting
> https://compute.googleapis.com/compute/v1/projects/gcloud-java-examples/zones/us-east1-b/instances?alt=json
> returned "The resource 'projects/gcloud-java-examples' was not found".
> Details: "[{'message': "The resource 'projects/gcloud-java-examples' was
> not found", 'domain': 'global', 'reason': 'notFound'}]">

Usually these kinds of errors are down to either path names being wrong
or permissions not being set.

> When i run gcloud command it works.
> 
> #gcloud compute instances list

I have no idea how that works, but it may not be working the same way
your app works. So it may not prove anything. Can you retrieve the
"missing" resource using an http request? Perhaps using the urllib module?

> What is the purpose of computeenginehelper.py file as per the below details?
> 
> [root at gcloudcomputeengine]# ll
> total 20
> -rw-r--r-- 1 root root 2582 Mar 10 00:13 README.md
> drwxr-xr-x 2 root root   48 Mar 10 00:14 __pycache__
> -rw-r--r-- 1 root root 5740 Mar 10 00:13 computeenginehelper.py
> -rw-r--r-- 1 root root 1641 Mar 10 00:13 computeengineinstances.py

I assume it contains helper functions used by the other file.
But you can open it and read the code to see what it does.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list