-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
2022.03.0: sphinx fails on generate documentation #6454
Comments
not sure, but that might be because your environment is missing the |
I've added ipykernel to build dependencies and build moved few steps forward and failed again + PYTHONPATH=/home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
/usr/lib/python3.8/site-packages/setuptools/dist.py:505: UserWarning: Normalizing '2022.03.0' to '2022.3.0'
warnings.warn(tmpl.format(**locals()))
running build_sphinx
Running Sphinx v4.5.0
python exec: /usr/bin/python3
sys.path: ['/home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0', '/home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0', '/usr/lib64/python38.zip', '/usr/lib64/python3.8', '/usr/lib64/python3.8/lib-dynload', '/usr/lib64/python3.8/site-packages', '/usr/lib/python3.8/site-packages']
xarray: 2022.3.0, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/xarray/__init__.py
making output directory... done
[autosummary] generating autosummary for: README.rst, api-hidden.rst, api.rst, contributing.rst, developers-meeting.rst, ecosystem.rst, examples/ERA5-GRIB-example.ipynb, examples/ROMS_ocean_model.ipynb, examples/apply_ufunc_vectorize_1d.ipynb, examples/area_weighted_temperature.ipynb, ..., user-guide/indexing.rst, user-guide/interpolation.rst, user-guide/io.rst, user-guide/pandas.rst, user-guide/plotting.rst, user-guide/reshaping.rst, user-guide/terminology.rst, user-guide/time-series.rst, user-guide/weather-climate.rst, whats-new.rst
[autosummary] generating autosummary for: /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.T.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.all.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.any.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.append.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argmax.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argmin.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argsort.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.array.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.asi8.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.asof.rst, ..., /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sin.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sinh.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sqrt.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.square.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.tan.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.tanh.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.trunc.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.unify_chunks.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.where.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.zeros_like.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://scitools-iris.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/objects.inv...
loading intersphinx inventory from https://numba.pydata.org/numba-doc/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/stable/objects.inv...
loading intersphinx inventory from https://docs.dask.org/en/latest/objects.inv...
loading intersphinx inventory from https://unidata.github.io/cftime/objects.inv...
loading intersphinx inventory from https://rasterio.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://sparse.pydata.org/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1282 added, 0 changed, 0 removed
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")
------------------
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipykernel_599775/3699872736.py in <module>
----> 1 ds = xr.tutorial.load_dataset("era5-2mt-2019-03-uk.grib", engine="cfgrib")
~/rpmbuild/BUILD/xarray-2022.03.0/xarray/tutorial.py in load_dataset(*args, **kwargs)
223 open_dataset
224 """
--> 225 with open_dataset(*args, **kwargs) as ds:
226 return ds.load()
227
~/rpmbuild/BUILD/xarray-2022.03.0/xarray/tutorial.py in open_dataset(name, cache, cache_dir, engine, **kws)
141 # retrieve the file
142 filepath = pooch.retrieve(url=url, known_hash=None, path=cache_dir)
--> 143 ds = _open_dataset(filepath, engine=engine, **kws)
144 if not cache:
145 ds = ds.load()
~/rpmbuild/BUILD/xarray-2022.03.0/xarray/backends/api.py 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, backend_kwargs, *args, **kwargs)
479 engine = plugins.guess_engine(filename_or_obj)
480
--> 481 backend = plugins.get_backend(engine)
482
483 decoders = _resolve_decoders_kwargs(
~/rpmbuild/BUILD/xarray-2022.03.0/xarray/backends/plugins.py in get_backend(engine)
154 engines = list_engines()
155 if engine not in engines:
--> 156 raise ValueError(
157 f"unrecognized engine {engine} must be one of: {list(engines)}"
158 )
ValueError: unrecognized engine cfgrib must be one of: ['store']
ValueError: unrecognized engine cfgrib must be one of: ['store']
You can ignore this error by setting the following in conf.py:
nbsphinx_allow_errors = True |
Everything should work if you create an environment using https://github.com/pydata/xarray/blob/main/ci/requirements/doc.yml . Can you try that please? |
Issue seems is in other place --- a/doc/conf.py~ 2022-03-02 15:49:23.000000000 +0000
+++ b/doc/conf.py 2022-04-15 18:32:06.848726986 +0000
@@ -17,6 +17,9 @@
import os
import subprocess
import sys
+
+sys.path.append(os.path.abspath('..'))
+
from contextlib import suppress
import sphinx_autosummary_accessors build-shinx shows: [tkloczko@devel-g2v xarray-2022.03.0]$ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v4.5.0
python exec: /usr/bin/python3
sys.path: ['/usr/bin', '/usr/lib64/python38.zip', '/usr/lib64/python3.8', '/usr/lib64/python3.8/lib-dynload', '/usr/lib64/python3.8/site-packages', '/usr/lib/python3.8/site-packages', '/home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0']
xarray: 2022.3.0, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/xarray/__init__.py
making output directory... done
[autosummary] generating autosummary for: README.rst, api-hidden.rst, api.rst, contributing.rst, developers-meeting.rst, ecosystem.rst, examples/ERA5-GRIB-example.ipynb, examples/ROMS_ocean_model.ipynb, examples/apply_ufunc_vectorize_1d.ipynb, examples/area_weighted_temperature.ipynb, ..., user-guide/indexing.rst, user-guide/interpolation.rst, user-guide/io.rst, user-guide/pandas.rst, user-guide/plotting.rst, user-guide/reshaping.rst, user-guide/terminology.rst, user-guide/time-series.rst, user-guide/weather-climate.rst, whats-new.rst
[autosummary] generating autosummary for: /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.T.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.all.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.any.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.append.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argmax.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argmin.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.argsort.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.array.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.asi8.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.CFTimeIndex.asof.rst, ..., /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sin.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sinh.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.sqrt.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.square.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.tan.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.tanh.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.ufuncs.trunc.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.unify_chunks.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.where.rst, /home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0/doc/generated/xarray.zeros_like.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://scitools-iris.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/objects.inv...
loading intersphinx inventory from https://numba.pydata.org/numba-doc/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/stable/objects.inv...
loading intersphinx inventory from https://docs.dask.org/en/latest/objects.inv...
loading intersphinx inventory from https://unidata.github.io/cftime/objects.inv...
loading intersphinx inventory from https://rasterio.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://sparse.pydata.org/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1282 added, 0 changed, 0 removed
reading sources... [ 0%] examples/ERA5-GRIB-example
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/nbsphinx.py", line 1032, in parse
rststring, resources = exporter.from_notebook_node(nb, resources)
File "/usr/lib/python3.8/site-packages/nbsphinx.py", line 842, in from_notebook_node
nb, resources = pp.preprocess(nb, resources)
File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 83, in preprocess
self.preprocess_cell(cell, resources, index)
File "/usr/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py", line 104, in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
File "/usr/lib/python3.8/site-packages/nbclient/util.py", line 84, in wrapped
return just_run(coro(*args, **kwargs))
File "/usr/lib/python3.8/site-packages/nbclient/util.py", line 62, in just_run
return loop.run_until_complete(coro)
File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/lib/python3.8/site-packages/nbclient/client.py", line 965, in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
File "/usr/lib/python3.8/site-packages/nbclient/client.py", line 862, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
import xarray as xr
import matplotlib.pyplot as plt
------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_1995816/830426931.py in <module>
----> 1 import xarray as xr
2 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'xarray'
ModuleNotFoundError: No module named 'xarray'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main
app.build(args.force_all, filenames)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 330, in build
self.builder.build_update()
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 283, in build_update
self.build(['__all__'], to_build)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 300, in build
updated_docnames = set(self.read())
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 407, in read
self._read_serial(docnames)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 428, in _read_serial
self.read_doc(docname)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 468, in read_doc
doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
File "/usr/lib/python3.8/site-packages/sphinx/io.py", line 181, in read_doc
pub.publish()
File "/usr/lib/python3.8/site-packages/docutils/core.py", line 217, in publish
self.document = self.reader.read(self.source, self.parser,
File "/usr/lib/python3.8/site-packages/sphinx/io.py", line 101, in read
self.parse()
File "/usr/lib/python3.8/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/usr/lib/python3.8/site-packages/nbsphinx.py", line 1039, in parse
raise NotebookError('\n'.join(lines))
nbsphinx.NotebookError: CellExecutionError in examples/ERA5-GRIB-example.ipynb:
------------------
import xarray as xr
import matplotlib.pyplot as plt
------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_1995816/830426931.py in <module>
----> 1 import xarray as xr
2 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'xarray'
ModuleNotFoundError: No module named 'xarray'
You can ignore this error by setting the following in conf.py:
nbsphinx_allow_errors = True
Notebook error:
CellExecutionError in examples/ERA5-GRIB-example.ipynb:
------------------
import xarray as xr
import matplotlib.pyplot as plt
------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_1995816/830426931.py in <module>
----> 1 import xarray as xr
2 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'xarray'
ModuleNotFoundError: No module named 'xarray'
You can ignore this error by setting the following in conf.py:
nbsphinx_allow_errors = True So for some reason at some point it cannot locate Running Sphinx v4.5.0
python exec: /usr/bin/python3
sys.path: ['/usr/bin', '/usr/lib64/python38.zip', '/usr/lib64/python3.8', '/usr/lib64/python3.8/lib-dynload', '/usr/lib64/python3.8/site-packages', '/usr/lib/python3.8/site-packages', '/home/tkloczko/rpmbuild/BUILD/xarray-2022.03.0'] Because i see used Could ypu please try to reproduce this issue by uninstall |
It seems like you're missing the Please see https://docs.xarray.dev/en/stable/contributing.html#how-to-build-the-xarray-documentation for instructions |
If you will follow procedure which I've provided by executing |
I'll close this as the reason for the failure is that |
Please have look one more time on top patch. |
if you look at your traceback, it says We tried the I'm not sure for which OS you're building packages for, but you should have some sort of isolated build environment (chroot / docker / something else?). The most reliable way to fix this issue then is to install the built package (a wheel?) into that development environment. |
So someting is messing with |
What happened?
Looks like sphinx fails on generate documentation with error message
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
Here is full sphinx output:
What did you expect to happen?
No response
Minimal Complete Verifiable Example
No response
Relevant log output
No response
Anything else we need to know?
No response
Environment
List of module sinstalled in build env
The text was updated successfully, but these errors were encountered: