-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HELP - ImportError: cannot import name 'Auth' from 'planet' - HELP #230
Comments
Hi Leon, Thanks for your message. What version of the planet package are you using? You should be on some version of 2.0, as the previous 1.0 version did not use the Auth module. You can learn more about how to get started with our Planet SDK using this Quick Start Guide. |
Good evening mkshah605, thank you for your answer. I were running the notebook inside the recommended docker container. It turned out that the planet package provided there is on version 1.5.0.2 or something. I set up an new environment outside the docker container now and installed planet 2.+ and everything ist working fine now for me. |
That's great to hear! Glad you got it working. We are working on updating the instructions, including package requirements, for this repo to be more current and accessible so issues like this can be avoided in the future. Thank you for bringing this to our attention! |
This worked for me when I had a similar issue: |
Hello everybody,
first of all I'm new to the planet API and to programming at all. I'm trying to do the tutorial notebooks but get stuck right at the start.
In the "analysis-ready-data"-folder, "ard_1_intro_and_best_practices.ipynb"
when trying to run this chunk
"""
from datetime import datetime
import json
import os
from pathlib import Path
from pprint import pprint
import time
from zipfile import ZipFile
import planet
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from planet import Auth
from planet import Session, DataClient, OrdersClient, data_filter, order_request
import rasterio
from rasterio import plot
from shapely.geometry import MultiPolygon, shape
"""
in the "analysis-ready-data"-folder, "ard_1_intro_and_best_practices.ipynb"-notebook
i get this error message:
"""
ImportError Traceback (most recent call last)
in
11 import matplotlib.pyplot as plt
12 import matplotlib.colors as colors
---> 13 from planet import Auth
14 from planet import Session, DataClient, OrdersClient, data_filter, order_request
15 import rasterio
ImportError: cannot import name 'Auth' from 'planet' (/opt/conda/lib/python3.7/site-packages/planet/init.py)
"""
I'm on windows OS and use the JupyterNotebooks in a docker container as recommended here "https://github.com/planetlabs/notebooks"
i tried to use the "auth" command in other notebooks and also in a seperate PyCharm-environment but always fail to import or find the command.
Did anyone face the same issue or got an idea what I'm doing wrong?
with kind regards,
Leon
The text was updated successfully, but these errors were encountered: