icesat2py / icepyx

Python tools for obtaining and working with ICESat-2 data
https://icepyx.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
213 stars 107 forks source link

cannot import 'icesat2data' from 'icepyx' #394

Closed Zilhe closed 1 year ago

Zilhe commented 1 year ago

Hi,

I have encountered an issue with the command 'from icepyx import icesat2data as ipd'

I've tried to install the icepyx with both the conda and pip. But the issue occurred in both cases.

The screenshot of this issue is pasted.

screen1

JessicaS11 commented 1 year ago

Hello @Zilhe! Thanks for getting in touch. Can you please share where you found the example code you are using? The ipd.Icesat2Data syntax has been deprecated for going on years now. We've tried to leave appropriate notes on the pages we have control over. Whenever possible, we encourage uses to refer to our documentation pages and the examples there (see the left sidebar) for the most up-to-date syntax. In your screen-shot use case, that would be:

import icepyx as ipx
region = ipx.Query(short_name, spatial_extent, date_range)

Please let us know if you continue to run into issues getting started with icepyx!

Zilhe commented 1 year ago

Hello @Zilhe! Thanks for getting in touch. Can you please share where you found the example code you are using? The ipd.Icesat2Data syntax has been deprecated for going on years now. We've tried to leave appropriate notes on the pages we have control over. Whenever possible, we encourage uses to refer to our documentation pages and the examples there (see the left sidebar) for the most up-to-date syntax. In your screen-shot use case, that would be:

import icepyx as ipx
region = ipx.Query(short_name, spatial_extent, date_range)

Please let us know if you continue to run into issues getting started with icepyx!

Thank you very much! It works with the recommended code.

I found the example code on https://github.com/ICESAT-2HackWeek/surface_classification. I just realized the code was uploaded two years ago, so the syntax may be outdated. I will study the documentation pages carefully. Thank you!

JessicaS11 commented 1 year ago

Ah - thank you! We have some notes in the data access portions of those materials, but did not update each of the tutorials that use icepyx. Please consider applying for this summer's ICESat-2 Hackweek (applications coming soon) to learn more about working with ICESat-2 data in the cloud!