Skip to content

Instantly share code, notes, and snippets.

@parulnith
Last active February 18, 2020 10:51
Show Gist options
  • Select an option

  • Save parulnith/a18be8f9ed34783d06b16344a8cae744 to your computer and use it in GitHub Desktop.

Select an option

Save parulnith/a18be8f9ed34783d06b16344a8cae744 to your computer and use it in GitHub Desktop.
links = result.json()[u"analytic"]["_links"]
self_link = links["_self"]
activation_link = links["activate"]
# Request activation of the 'analytic' asset:
activate_result = \
requests.get(
activation_link,
auth=HTTPBasicAuth(PLANET_API_KEY, '')
)
activation_status_result = \
requests.get(
self_link,
auth=HTTPBasicAuth(PLANET_API_KEY, '')
)
print(activation_status_result.json()["status"])
@Antonino22
Copy link

NameError Traceback (most recent call last)
in ()
----> 1 links = result.json()[u"analytic"]["_links"]
2 self_link = links["_self"]
3 activation_link = links["activate"]
4
5 # Request activation of the 'analytic' asset:

NameError: name 'result' is not defined

Im getting this error and I dont understand why?

@chanda-cpz
Copy link

I am facing the same trouble.
Were u able to fix it?

@Aveen1
Copy link

Aveen1 commented Jan 2, 2020

I'm also facing this error, anyone have solution?

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