Skip to content
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

Issue while building the docs. #9141

Closed
Anu-Ra-g opened this issue Jun 20, 2024 · 13 comments
Closed

Issue while building the docs. #9141

Anu-Ra-g opened this issue Jun 20, 2024 · 13 comments
Labels
plan to close May be closeable, needs more eyeballs

Comments

@Anu-Ra-g
Copy link
Contributor

Anu-Ra-g commented Jun 20, 2024

What is your issue?

I'm trying to build the xarray docs locally, by following the steps.

conda env create -f ci/requirements/doc.yml 
conda activate xarray-docs
cd docs/
make html

But I'm getting this error,

reading sources... [  0%] examples/ERA5-GRIB-example                                                                                                                              
Notebook error:
CellExecutionError in examples/ERA5-GRIB-example.ipynb:
------------------
ds = xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib", engine="cfgrib")
------------------

----- stderr -----
/home/anurag/Code/GSoC/xarray/xarray/backends/plugins.py:80: RuntimeWarning: Engine 'cfgrib' loading failed:
xarray_plugin module needs xarray version >= 0.18+
  warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
------------------

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[2], line 1
----> 1 ds = xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib", engine="cfgrib")

File ~/Code/GSoC/xarray/xarray/tutorial.py:207, in load_dataset(*args, **kwargs)
    170 def load_dataset(*args, **kwargs) -> Dataset:
    171     """
    172     Open, load into memory, and close a dataset from the online repository
    173     (requires internet).
   (...)
    205     load_dataset
    206     """
--> 207     with open_dataset(*args, **kwargs) as ds:
    208         return ds.load()

File ~/Code/GSoC/xarray/xarray/tutorial.py:162, in open_dataset(name, cache, cache_dir, engine, **kws)
    160 # retrieve the file
    161 filepath = pooch.retrieve(url=url, known_hash=None, path=cache_dir)
--> 162 ds = _open_dataset(filepath, engine=engine, **kws)
    163 if not cache:
    164     ds = ds.load()

File ~/Code/GSoC/xarray/xarray/backends/api.py:557, in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, inline_array, chunked_array_type, from_array_kwargs, backend_kwargs, **kwargs)
    554 if from_array_kwargs is None:
    555     from_array_kwargs = {}
--> 557 backend = plugins.get_backend(engine)
    559 decoders = _resolve_decoders_kwargs(
    560     decode_cf,
    561     open_backend_dataset_parameters=backend.open_dataset_parameters,
   (...)
    567     decode_coords=decode_coords,
    568 )
    570 overwrite_encoded_chunks = kwargs.pop("overwrite_encoded_chunks", None)

File ~/Code/GSoC/xarray/xarray/backends/plugins.py:205, in get_backend(engine)
    203     engines = list_engines()
    204     if engine not in engines:
--> 205         raise ValueError(
    206             f"unrecognized engine {engine} must be one of: {list(engines)}"
    207         )
    208     backend = engines[engine]
    209 elif isinstance(engine, type) and issubclass(engine, BackendEntrypoint):

ValueError: unrecognized engine cfgrib must be one of: ['netcdf4', 'h5netcdf', 'scipy', 'store', 'zarr']

You can ignore this error by setting the following in conf.py:

    nbsphinx_allow_errors = True

make: *** [Makefile:58: html] Error 2

The specific error message suggests that the xarray version you are using does not support the cfgrib engine because it requires xarray version 0.18 or higher. But while building the environment, an editable version of xarray is installed and cfgrib is also installed inside the environment.

@Anu-Ra-g Anu-Ra-g added the needs triage Issue that has not been reviewed by xarray team member label Jun 20, 2024
Copy link

welcome bot commented Jun 20, 2024

Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the Contributing Guide for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!

@Anu-Ra-g
Copy link
Contributor Author

It worked fine, when I commented out the following part in doc.yml

  - sphinxext-opengraph
  - sphinxext-rediraffe
  - zarr>=2.10
  # - pip:
  #     # relative to this file. Needs to be editable to be accepted.
  #     - -e ../..

@Anu-Ra-g Anu-Ra-g reopened this Jun 24, 2024
@Anu-Ra-g Anu-Ra-g mentioned this issue Jun 24, 2024
1 task
@keewis
Copy link
Collaborator

keewis commented Jun 24, 2024

as mentioned in #9164, we can't do that. Instead, I believe we should try to figure out where the error is coming from. This warning:

/home/anurag/Code/GSoC/xarray/xarray/backends/plugins.py:80: RuntimeWarning: Engine 'cfgrib' loading failed:
xarray_plugin module needs xarray version >= 0.18+

leads me to believe that the version is not correctly inferred from the repository. Can you try git tag to see if you fetched all the relevant tags? This should include the v2024.06.0 tag.

@Anu-Ra-g
Copy link
Contributor Author

I'm not getting any output on doing git tag inside the terminal.

@keewis
Copy link
Collaborator

keewis commented Jun 24, 2024

okay, then try git fetch --tags followed by git tag

@Anu-Ra-g
Copy link
Contributor Author

I'm still not getting any output.

@max-sixty
Copy link
Collaborator

What does git fetch --tags show?

@Anu-Ra-g
Copy link
Contributor Author

It shows nothing,

anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git tag
anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git fetch --tags
anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ 

@max-sixty
Copy link
Collaborator

You'll want to debug why it's not fetching tags — maybe the remote isn't correct?

@Anu-Ra-g
Copy link
Contributor Author

The remote links are correct,

anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git remote -v
origin  https://github.com/Anu-Ra-g/xarray.git (fetch)
origin  https://github.com/Anu-Ra-g/xarray.git (push)
upstream        https://github.com/pydata/xarray.git (fetch)
upstream        https://github.com/pydata/xarray.git (push)
anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git tag
anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git fetch --tags
anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ 

@max-sixty
Copy link
Collaborator

Ok, you should debug why the tags don't fetch...

@Anu-Ra-g
Copy link
Contributor Author

I did this,

anurag@anurag-ThinkPad-E16-Gen-1:~/Code/GSoC/xarray$ git ls-remote --tags https://github.com/pydata/xarray.git
5877711c9ddd9405cdb9058d180b440cdc46481c        refs/tags/v0.1
f3bb6e9cfebaa95523326834cd8bc5283ba43d80        refs/tags/v0.1.1
4015ef6b219048bd5eed5e0b634abdd8a9cb0656        refs/tags/v0.10.0
6d64c58272f2b36b739fdaa3ff5b402135b036b7        refs/tags/v0.10.0^{}
1f3bd91be3c1d7ec96180f213505b86c1f4bdc4a        refs/tags/v0.10.0rc1
692d252a6caa17b28c192c7573dd6c183de47686        refs/tags/v0.10.0rc1^{}
a95df9950182f4dc05161ef854bdee640a4acdb6        refs/tags/v0.10.0rc2
872edbee4e82779b5fa1e7f3fcaec5cc84cd5748        refs/tags/v0.10.0rc2^{}
580f51bf8b0218113405babd0ef3a51203cb2952        refs/tags/v0.10.1
7191859ec9a5a20bb179de9c233b79017e735773        refs/tags/v0.10.1^{}
573f6f101cb81e2f53043c80df90b4af5cd17266        refs/tags/v0.10.2
1481656a323323c38e9923f871d27ecadc26d6ae        refs/tags/v0.10.2^{}
d6dbbb2e8e2526b19639493d00b8f2a4f4f34fd0        refs/tags/v0.10.3
4cbb7cbd86af1ccfe2b3b98f0e36a410f86d77ef        refs/tags/v0.10.3^{}
8f52a0b43b4aefba3dde121e2fdf65ca8d0eab58        refs/tags/v0.10.4
5d7304ea49dc04d7ce0d11947437fb0ad1fbd001        refs/tags/v0.10.4^{}
2b384083183e2de648083bdd5515f0de91de9621        refs/tags/v0.10.5
ad47ced88c1c99fd961617943e02613b67c9cea9        refs/tags/v0.10.5^{}
4fa9b273a0f3bac122f21e96a7edb516d0c9cbe3        refs/tags/v0.10.6
1c9b4b2e556b81f1e668ae7aa3aaea8aa91b7983        refs/tags/v0.10.6^{}
5fb4e86feecb1edcfda208e4016b3b58ae3ca5ca        refs/tags/v0.10.7
bb581ca206c80eea80270ba508ec80ae0cd3941f        refs/tags/v0.10.7^{}
cdc68d706b0090b0391898d62269613379a376c0        refs/tags/v0.10.8
024aa098b1d385d806ad7e3b97bcd3a5033f2ae0        refs/tags/v0.10.8^{}
933dd03ad6f69068de119c330f484ea4837b4edc        refs/tags/v0.10.9
93f58a60fdb6260f5d5a156c78dca0d956c75fe3        refs/tags/v0.10.9^{}
96274cd63e1ab7881660353701f84b91d24d2d1c        refs/tags/v0.11.0
bcb10b14d5c83375dca7a214f00a67c49f80049c        refs/tags/v0.11.0^{}
f04558ea4c229db2cf619942e73219d993398c9c        refs/tags/v0.11.1
d1d2ecec5febabceea9b724c26dd92180322c819        refs/tags/v0.11.1^{}
4da895d583343cef4eb7ae1f5c59360a980abafa        refs/tags/v0.11.2
624d78f48cfa54b8952219ecf37bcee4673da900        refs/tags/v0.11.2^{}
3a16ecf8b360763fff708fc635137cbf9bf5208a        refs/tags/v0.11.3
d58e0769c7d600d5c8c3c2fb52aa28856c4d3290        refs/tags/v0.11.3^{}
ddfd361d50cafa382a0d4989b4f071e0f4a006c9        refs/tags/v0.12.0
ad977c94eaaa1ad151bb46f2dad319566261c282        refs/tags/v0.12.0^{}
7ef1e66a65b42ac06d1fbbcb79c2b8120ab7ff7e        refs/tags/v0.12.1
aa6abb592ac2464170459ca96409398ec8b4593a        refs/tags/v0.12.1^{}
8080805460387f7572b2d65f1893ca8aaf88fa40        refs/tags/v0.12.2
fbe53fe2a35b3eeda63e50f1f38c7cfc92134a0c        refs/tags/v0.12.2^{}
a0173bcfa3c99159961b2e16a3425e0af5d4d44a        refs/tags/v0.12.3
96a337f451885d22a9cb4dca55d04a045ba4e4ff        refs/tags/v0.12.3^{}
2776d2d8a035a00f32fe961bc3676b48f274a093        refs/tags/v0.13.0
5b727951b60f7fa7c096b5f0a6583aad3bff11dd        refs/tags/v0.13.0^{}
0b88eaf74299cac145017008f346a9c1ac66d220        refs/tags/v0.14.0
62943e2b90e46ee9b09b1e4811155c3d36f7ca8f        refs/tags/v0.14.0^{}
7a97e664cb863b06b4d920815a8067b7f415bb7f        refs/tags/v0.14.1
0ef9aa3abae55833e4431d690bc55c5b5a44911b        refs/tags/v0.14.1^{}
2bc3a63949d8bdf57504acb895ec33944517d27d        refs/tags/v0.15.0
705eb0f6700125472489b28926696c5cd70caf86        refs/tags/v0.15.0^{}
5e4477b2e5c73bedc7a0e24445a3d46d4ba7712e        refs/tags/v0.15.1
732b6cd6248ce715da74f3cd7a0e211eaa1d0aa2        refs/tags/v0.15.1^{}
edfc54b899c598ddec77b2ddd07ca9064e97ec34        refs/tags/v0.16.0
567692634a56a13076a3ad39a46927a613d9e13f        refs/tags/v0.16.0^{}
66a10dfe47e122628bc7be4fdad011722fed0bc7        refs/tags/v0.16.1
633187e32be3559ee4989b5049449d51372a1178        refs/tags/v0.16.1^{}
1c98a140f9cb1463a6525974f058098072e1ff7b        refs/tags/v0.16.2
cc53a77ff0c8aaf8686f0b0bd7f75985b74e2054        refs/tags/v0.16.2^{}
d5b0ee4e605fe05d4f5530e4af545a69b4aa02e5        refs/tags/v0.17.0
835a53e62b1e5018faa323c649149e8294dd6af7        refs/tags/v0.17.0^{}
8b028e3f6a2a06b9ae4b8073f3b0f0151b6bebc3        refs/tags/v0.18.0
165d4969fcb6b9fc714deefac29bf791a8916a20        refs/tags/v0.18.1
1b4412eeb7011f53932779e1d7c3534163aedd63        refs/tags/v0.18.2
53790638f3eb0801efd2ac2aa0ae205b8a8f10e0        refs/tags/v0.19.0
db6598a447ae686cdb08d95f3a788f7034b593a4        refs/tags/v0.2
50b2a1bb4baf5f70f58d28e40112a9c05a2812ef        refs/tags/v0.2.0alpha
12590005f2c39e3a9459b7ec4966fd535b64c759        refs/tags/v0.20.0
12a216d632111fc6be39cdaa98335a9bb22f2c5d        refs/tags/v0.20.1
3ff11c5edd8e2674bc528292c46152fc8f2cb138        refs/tags/v0.20.2
8a885c1891f84536a3b4a15c03a61bfa132d180f        refs/tags/v0.21.0
fe491b14b113c185b5b9a18e4f643e5a73208629        refs/tags/v0.21.1
646cb5abbae8999e568d8e0e13f688bea11cca37        refs/tags/v0.3
d6eedc70b7fddd3b354844e0e2e65d7626391510        refs/tags/v0.3.1
76ee314bdc1c70907d3784f55b4b7ba2c7e572b2        refs/tags/v0.3.1^{}
8ac101c4d891859df2c22c0a7d477228163a2cb7        refs/tags/v0.3.2
e0994b454d9e3b177959002e5b73e368634b3c03        refs/tags/v0.3.2^{}
6a6846eff83c5148996e40bf2afa4b7caa61ee5f        refs/tags/v0.4
f2fd776841fca3d025cb0b9926aa0298aa3dbbbd        refs/tags/v0.4^{}
74cdd116d8a95f3ab21e0f4917dd77cf77c063e1        refs/tags/v0.4.1
f7dc779756c2cf5a0d105d2d3963352a4ac20450        refs/tags/v0.4.1^{}
1046537cbe2763c175dc0dd111fd3c74acdc3ad6        refs/tags/v0.4rc1
034bca19968abe07c6d22339203ac7ad940afdbd        refs/tags/v0.4rc1^{}
e397b8239942eb754913818fb478763e5b6292f8        refs/tags/v0.5
66abe7fffd336494ea78118c8525cddcc8dca0f0        refs/tags/v0.5^{}
1cb2d4fce22ff0961e1cca710d3c9a66a0dea0dc        refs/tags/v0.5.1
f986a69def5e882baf801b3d97a9121f80301d40        refs/tags/v0.5.1^{}
52211af4d3119d97a8b4fe91988afe3e87d0f814        refs/tags/v0.5.2
6de83e1919b51c4f57c17229480afb2e9b0b8a2c        refs/tags/v0.5.2^{}
3aa6e2b93405bb419512238255a76f13f89f0fdf        refs/tags/v0.6.0
97b3d0bb781c9bb8b6c9d997f0cd379d12291176        refs/tags/v0.6.0^{}
1d62638b5a1cd4f55c1826963285d8ab17f1b33d        refs/tags/v0.6.1
07bb75a7f43afbaf880a5d49dfb643e209ce9d42        refs/tags/v0.6.1^{}
c5bd8808659c24084e16653796a9e307313c20e1        refs/tags/v0.7.0
66057e60201ac5a2e4cd37913220f2ea42e6f06e        refs/tags/v0.7.0^{}
c699a5706eb7215e2ae6f7b3625e20581836ed16        refs/tags/v0.7.1
a5410484068d6b038589b73aaddb65bb8205694d        refs/tags/v0.7.1^{}
c4bcad5284e96fff6e604bf1c6e18746e7c02c61        refs/tags/v0.7.2
b45e8d325861d624d0d3a940ba301758568f4c58        refs/tags/v0.7.2^{}
0dc855c14f3b7cb4c62873088f2952656c694c49        refs/tags/v0.8.0
eb09370228ca581e41317fe01f01875cde626bbc        refs/tags/v0.8.0^{}
b62d5d6ff1159ec3f72112f1250060e20cb67cb9        refs/tags/v0.8.0rc1
9c6c536a9bf45c5acbf17e13e5caf4bf9a3df2cd        refs/tags/v0.8.0rc1^{}
afdb066f164aab5b4757997554b3aee795cfdcdf        refs/tags/v0.8.1
22dee70182074b967218c678e75809e1cf69ec14        refs/tags/v0.8.1^{}
73c25a8397b02f014a702ffd30c9533816546f24        refs/tags/v0.8.2
1b92db4317a8576b6c27d64d2be10b5ddfd0f69f        refs/tags/v0.8.2^{}
af8864dba9c1b2748b5e628d97981884d70b201f        refs/tags/v0.9.0
8c709e3762a2d3c4b09d0fea3e9265503cf66ac5        refs/tags/v0.9.0^{}
404634d494cd2fdb64caac81e397b375ef97b46e        refs/tags/v0.9.0rc1
d42f3839683650616487ef0607b70ce9bf182210        refs/tags/v0.9.0rc1^{}
78afca295aa2a56fc0d52d616ebb649ed069289e        refs/tags/v0.9.1
7f026a10cde4316b48ff4ee1bd0d0d4fe1bc6a0d        refs/tags/v0.9.1^{}
fc06d48881b714cbdc81048c88bd5299959c5a78        refs/tags/v0.9.2
30a51aaa786e167a63e4fe9d15a80303597e7a61        refs/tags/v0.9.2^{}
2851ae03b4ab74f451ba15d42a803c26ad808165        refs/tags/v0.9.3
4d28821129eedd237f4ac89150e83b2dfc49f669        refs/tags/v0.9.3^{}
be0f0cf6f49b529401f296277cfd9b62b0e34c7a        refs/tags/v0.9.4
d6284e8dc6be2d9c3670ee5799e5e63c38d30f67        refs/tags/v0.9.4^{}
3826f17a1637183d9b61fff080d1e00146792fb9        refs/tags/v0.9.5
1b28edac0f779faad312cdb810c091244eb9acff        refs/tags/v0.9.5^{}
7818690cee322f976487b1e334f3a4da03099136        refs/tags/v0.9.6
c88e46a9d4c517e8f2b1b740b978b98ad188b895        refs/tags/v0.9.6^{}
9b4d0b29c319f4b68f89328b1bf558711f339504        refs/tags/v2022.03.0
4ad706fc4ef102c525555d55b20bc7ccc72d7045        refs/tags/v2022.06.0
d1e4164f3961d7bbb3eb79037e96cae14f7182f8        refs/tags/v2022.06.0rc0
208e58869758d7ceb01fba8422e2caaa7296268c        refs/tags/v2022.09.0
a45480f6f81851e4456f0ad0cab4e5e0d6bd70c2        refs/tags/v2022.10.0
690d3ce298e1f1032397c873bad101e6510b582f        refs/tags/v2022.11.0
38d335defa0e4a83f2f8eaf1cd0a9e6356b8b361        refs/tags/v2022.12.0
d0bfd00d41fd3a70b70f7f63b7f94f775da9be9c        refs/tags/v2023.01.0
6c45d7fc472e200ca39300d25294fcb7a0bef04d        refs/tags/v2023.02.0
96030d4825159c6259736155084f38ee8db5c9bb        refs/tags/v2023.03.0
e1dc02b811e16fa3e389fed02b5cedfcd1c70bd6        refs/tags/v2023.04.0
4f5675c2747c78efd9b0384773f156f5d2d5fa03        refs/tags/v2023.04.1
91f14c9bc2de8cfad15096c0f7b79b0803474c68        refs/tags/v2023.04.2
97a2032a163bb36f6d9e4bf7bff3eca7d7e3faa4        refs/tags/v2023.05.0
cbc02e3d3155cd1e178d62a3897889546152e9e8        refs/tags/v2023.06.0
4ad85f55dcae8959bbacb78e630d77d12493dbd8        refs/tags/v2023.07.0
83c2919b27b4b2d8a01bfa380226134c71321aa0        refs/tags/v2023.08.0
ba7f2d5dc8a6f77c91a3bb9e54b5ca39abcdb939        refs/tags/v2023.09.0
1e8f618e9d3754cb892a8438a1a7745aadce2bbf        refs/tags/v2023.10.0
038ef217f1bb5a480cea2fbc63baa8b537f8c861        refs/tags/v2023.10.1
4473d6dae6b475cfb5253dba5268b35b6ffaa8fb        refs/tags/v2023.11.0
1fd5286716457f9e843a5e56ecf8ead7e09664e8        refs/tags/v2023.12.0
e91ee89edbdec4299897e60c9d97d0cf915353c9        refs/tags/v2024.01.0
15fb1d8abf62f15c96b44ffb235fcd98fbe4fd21        refs/tags/v2024.01.1
626648a16568a19d4a90e425c851570a7b3ecac0        refs/tags/v2024.02.0
b80260781ee19bddee01ef09ac0da31ec12c5152        refs/tags/v2024.03.0
da9ff0ab287ec7ad3ab3aed73860178bc5b6e761        refs/tags/v2024.05.0
bef04067dd87f9f0c1a3ae7840299e0bbdd595a8        refs/tags/v2024.06.0

@max-sixty max-sixty added plan to close May be closeable, needs more eyeballs and removed needs triage Issue that has not been reviewed by xarray team member labels Jun 26, 2024
@keewis
Copy link
Collaborator

keewis commented Jul 11, 2024

I suspect your default fetch repository is origin, your fork, which doesn't have the tags. If you do git fetch --tags upstream, you should get all the tags.

I'm going to close this as I'm pretty sure this is a usage error, but feel free to comment if you need more help.

@keewis keewis closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to close May be closeable, needs more eyeballs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants