OGGM / tutorials

Notebook tutorials for the Open Global Glacier Model (OGGM)
https://tutorials.oggm.org
BSD 3-Clause "New" or "Revised" License
18 stars 18 forks source link

Issue on page /notebooks/10minutes/preprocessed_directories.html #125

Closed cmacneil24 closed 5 months ago

cmacneil24 commented 5 months ago

I am working through the tutorial but when I get to the Glacier directories section at this point:

[5] from oggm import workflow from oggm import DEFAULT_BASE_URL DEFAULT_BASE_URL

I get the following error:

ImportError Traceback (most recent call last) Cell In[5], line 2 1 from oggm import workflow ----> 2 from oggm import DEFAULT_BASE_URL 3 DEFAULT_BASE_URL

ImportError: cannot import name 'DEFAULT_BASE_URL' from 'oggm' (/usr/local/pyenv/versions/3.10.10/lib/python3.10/site-packages/oggm/init.py)

This makes it impossible for me to move forward and just wondered if there is something I can do to fix the issue? all of the other steps leading up to that point seem to have been run without errors. Thanks so much, Christina

fmaussion commented 5 months ago

It's likely your OGGM version is too old - what is the output of:

from oggm.utils import show_versions
print(show_versions())
cmacneil24 commented 5 months ago

Thanks so much for the quick reply! The output is:

OGGM environment:

System info:

python: 3.10.10.final.0

python-bits: 64

OS: Linux

OS-release: 6.5.0-35-generic

machine: x86_64

processor: x86_64

Packages info:

oggm: 1.6.0

numpy: 1.23.5

scipy: 1.9.3

pandas: 1.5.3

geopandas: 0.12.2

netCDF4: 1.6.3

matplotlib: 3.7.1

rasterio: 1.3.6

fiona: 1.9.1

pyproj: 3.4.1

shapely: 2.0.1

xarray: 2023.2.0

dask: 2023.3.0

salem: 0.3.10.dev1+gfe1a230

OGGM git identifier: dd5c520ce73e0fe40e9d06757952320cb5a779f0

From: Fabien Maussion @.> Sent: Tuesday, June 11, 2024 12:31 AM To: OGGM/tutorials @.> Cc: Christina MacNeil @.>; Author @.> Subject: Re: [OGGM/tutorials] Issue on page /notebooks/10minutes/preprocessed_directories.html (Issue #125)

It's likely your OGGM version is too old - what is the output of:

from oggm.utils import show_versions

print(show_versions())

- Reply to this email directly, view it on GitHubhttps://github.com/OGGM/tutorials/issues/125#issuecomment-2159997582, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCZ4MOU7VWNY7C5JF5SVB3ZG2RTVAVCNFSM6AAAAABJDHARSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJZHE4TONJYGI. You are receiving this because you authored the thread.Message ID: @.**@.>>

fmaussion commented 5 months ago

yes - please update OGGM to the latest version.

pip install --upgrade oggm

cmacneil24 commented 5 months ago

Thank you! It's working now, so much appreciated! c

From: Fabien Maussion @.> Sent: Tuesday, June 11, 2024 9:54 AM To: OGGM/tutorials @.> Cc: Christina MacNeil @.>; Author @.> Subject: Re: [OGGM/tutorials] Issue on page /notebooks/10minutes/preprocessed_directories.html (Issue #125)

yes - please update OGGM to the latest version.

pip install --upgrade oggm

- Reply to this email directly, view it on GitHubhttps://github.com/OGGM/tutorials/issues/125#issuecomment-2161215580, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCZ4MI57OXNY67JIIWARIDZG4TTRAVCNFSM6AAAAABJDHARSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGIYTKNJYGA. You are receiving this because you authored the thread.Message ID: @.**@.>>