Giter Club home page Giter Club logo

Comments (4)

jdbcode avatar jdbcode commented on June 9, 2024

earthengine-api v0.1.383 include changes for authentication and initialization (see changelog and updated guide).

You'll probably need to add the project you'd like to initialize with, e.g.:

ee.Initialize(project='my-project-id')

Can you please confirm whether this works for you or not.

from earthengine-community.

haydenclose avatar haydenclose commented on June 9, 2024

Thanks for the reply but still somewhat confused.
So for colab examples now i need to create a project for each one? even if it is a demo script or examples from github https://colab.research.google.com/github/google/earthengine-community/blob/master/tutorials/detecting-changes-in-sentinel-1-imagery-pt-1/index.ipynb#scrollTo=XeFsiSp2aDL6?
I created a project and tried it again but still having issues

ee.Authenticate()
ee.Initialize(project = 'Cloud Based Oil Detection')

HttpError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/ee/data.py in _execute_cloud_call(call, num_retries)
382 try:
--> 383 return call.execute(num_retries=num_retries)
384 except googleapiclient.errors.HttpError as e:

7 frames
HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1/projects/Cloud%20Based%20Oil%20Detection/algorithms?prettyPrint=false&alt=json returned "Project 'projects/Cloud Based Oil Detection' not found or deleted.". Details: "[{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'USER_PROJECT_DENIED', 'domain': 'googleapis.com', 'metadata': {'service': 'earthengine.googleapis.com', 'consumer': 'projects/Cloud Based Oil Detection'}}]">

During handling of the above exception, another exception occurred:

EEException Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/ee/data.py in _execute_cloud_call(call, num_retries)
383 return call.execute(num_retries=num_retries)
384 except googleapiclient.errors.HttpError as e:
--> 385 raise _translate_cloud_exception(e) # pylint: disable=raise-missing-from
386
387

EEException: Project 'projects/Cloud Based Oil Detection' not found or deleted.

from earthengine-community.

jdbcode avatar jdbcode commented on June 9, 2024

Earth Engine computation is run through a Cloud project. You only need a single Cloud project that is Earth Engine enabled. For example, my primary project ID is 'ee-braaten'. I use it in the JavaScript Code Editor and in any Colab notebook that I'm using Earth Engine. No need for a separate project for each Notebook - it is a one-time setup.

It looks like you are providing the Project name, but it needs to be the Project ID. See the distinction here: https://cloud.google.com/resource-manager/docs/creating-managing-projects

from earthengine-community.

jdbcode avatar jdbcode commented on June 9, 2024

Closing this thread as it is off-topic (not related to contents of the repository). For help with general Earth Engine errors, please see this help guide for routing the issue.

In this case, a good resource is the Earth Engine Developer Forum. There is a current thread on the auth issue, for example.

from earthengine-community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.