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

Obscure build error with 0.12.3 #330

Closed
rabernat opened this issue May 25, 2021 · 3 comments
Closed

Obscure build error with 0.12.3 #330

rabernat opened this issue May 25, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@rabernat
Copy link

rabernat commented May 25, 2021

Describe the bug

We use myst-nb in the gcm-filters sphinx documentation. Our RTD build environment did not include a pinned version of myst-nb. Once myst-nb 0.12.3 was release, our build broke with an obscure error message.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/application.py", line 349, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 297, in build_update
    self.build(to_build,
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 418, in read
    self._read_serial(docnames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 439, in _read_serial
    self.read_doc(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 479, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/io.py", line 316, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/docutils/core.py", line 217, in publish
    self.document = self.reader.read(self.source, self.parser,
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/sphinx/io.py", line 130, in read
    self.parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/docutils/readers/__init__.py", line 77, in parse
    self.parser.parse(self.input, document)
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/myst_nb/parser.py", line 69, in parse
    md_parser, env, tokens = nb_to_tokens(ntbk)
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/myst_nb/parser.py", line 89, in nb_to_tokens
    md = default_parser().disable("front_matter", ignoreInvalid=True)
TypeError: default_parser() missing 1 required positional argument: 'config'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/gcm-filters/conda/34/lib/python3.8/site-packages/myst_nb/parser.py", line 89, in nb_to_tokens
    md = default_parser().disable("front_matter", ignoreInvalid=True)
TypeError: default_parser() missing 1 required positional argument: 'config'
The full traceback has been saved in /tmp/sphinx-err-ucrd36ep.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Pinning to 0.12.2 resolved the problem.

To Reproduce

Steps to reproduce the behavior:

  1. Create the conda environment for our doc build: environment.yml
  2. Clone our repo: https://github.com/ocean-eddy-cpt/gcm-filters
  3. cd docs; make html

Expected behavior

We expected that a bugfix version release (0.12.2 -> 0.12.3) would not contain a breaking change.

cc @NoraLoose, ocean-eddy-cpt/gcm-filters#34 (comment)

@rabernat rabernat added the bug Something isn't working label May 25, 2021
@chrisjsewell
Copy link
Member

Heya, in your build it shows that myst-parser 0.14.0 is installed, this is despite both the setup.cfg (https://github.com/executablebooks/MyST-NB/blob/v0.12.3/setup.cfg) and conda recipe (https://github.com/conda-forge/myst-nb-feedstock/blob/master/recipe/meta.yaml) specifically pinning myst-parser to 0.13. So I would suggest this is an issue with your Conda build.
I'm not clear why you are putting myst-nb, myst-parser, sphinx-book-theme, sphinx-copybutton and jupyter_client in the pip section, since they are all available on Conda?

@rabernat
Copy link
Author

Thanks for the tip Chris. TBH I don't know the answer to how the environment got configured that way. All I know is that pinning myst_nb to 0.12.2 fixed it.

Based on your analysis (which is much more insightful than mine), it seems likely that that this funky environment and dependency weirdness are the cause of the problems, not anything about myst-nb. So feel free to close this.

I will work on updating / simplifying our environment to see if the issues go away.

@chrisjsewell
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants