Skip to content

The resource 'projects/gcloud-java-examples' was not found #1

Description

@kaushalshriyan

Hi GCP Support Team,

I am referring to https://github.com/alfonsof/google-cloud-python-examples and I am encountering the below issue

#python3 computeengineinstances.py

MENU
0 = Quit
1 = List all VM instances
2 = Create VM instance
3 = List VM instance
4 = Start instance
5 = Stop instance
6 = Reset instance
7 = Delete instance

Enter an option? 1
Listing VM instances ...
Traceback (most recent call last):
  File "/root/google-cloud-python-examples/gcloudcomputeengine/computeengineinstances.py", line 56, in <module>
    main()
  File "/root/google-cloud-python-examples/gcloudcomputeengine/computeengineinstances.py", line 33, in main
    computeenginehelper.list_instances()
  File "/root/google-cloud-python-examples/gcloudcomputeengine/computeenginehelper.py", line 27, in list_instances
    response = compute.instances().list(project=PROJECT_NAME, zone=ZONE_NAME).execute()
  File "/usr/local/lib/python3.9/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/googleapiclient/http.py", 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'}]">

When i run gcloud command it works.

gcloud compute instances list
NAME                                                 ZONE            MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP     STATUS
docker-drupal-krishnamohan                           europe-west2-a  e2-medium                   10.0.0.30    34.142.12.199   RUNNING
gke-dac-drupal-gke-clust-default-pool-92350ba9-390b  europe-west2-a  n2-standard-2               10.0.0.27    35.189.124.212  RUNNING
gke-dac-drupal-gke-clust-default-pool-b42e3504-sss9  europe-west2-b  n2-standard-2               10.0.0.25    35.197.228.58   RUNNING
apache-cassandra-servicetest-jineesh                 europe-west2-c  e2-medium                   10.0.0.18                    TERMINATED
apache-servicetest-jineesh                           europe-west2-c  e2-medium                   10.0.0.13    35.197.224.90   TERMINATED
apigee-1node-test-instance                           europe-west2-c  n2-standard-2               10.0.0.20                    TERMINATED
apigee-servicetest-jineesh                           europe-west2-c  e2-standard-2               10.0.0.22                    TERMINATED
gke-dac-drupal-gke-clust-default-pool-ee4376e8-lx9g  europe-west2-c  n2-standard-2               10.0.0.26    35.246.48.65    RUNNING
hsbctest-instance-1                                  europe-west2-c  e2-medium                   10.0.0.9     35.234.154.248  TERMINATED
jenkins-sreejith                                     europe-west2-c  e2-medium                   10.0.0.23                    TERMINATED
nginx-servicetest-jineesh                            europe-west2-c  e2-medium                   10.0.0.10                    TERMINATED
pgql-servicetest-jineesh                             europe-west2-c  e2-medium                   10.0.0.19                    TERMINATED

Any clue regarding the below issue?

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'}]">

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions