executablebooks / sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
https://sphinx-external-toc.readthedocs.io
MIT License
33 stars 18 forks source link

unexpected keyword argument 'value_serializer' #49

Closed temuller closed 3 years ago

temuller commented 3 years ago

I recently updated jupyter book and tried building a book but got the following error:

Running Sphinx v3.5.4
[etoc] Changing master_doc to 'Intro'
loading pickled environment... failed
failed: build environment version not current
myst v0.13.6: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, update_mathjax=True, enable_extensions=['colon_fence', 'dollarmath', 'linkify', 'substitution'], disable_syntax=[], url_schemes=['mailto', 'http', 'https'], heading_anchors=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'])

Exception occurred:
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/sphinx_external_toc/api.py", line 152, in <dictcomp>
    for k in sorted(self._docs)
TypeError: asdict() got an unexpected keyword argument 'value_serializer'
The full traceback has been saved in /tmp/sphinx-err-q__1wxs1.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!
Traceback (most recent call last):
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/jupyter_book/sphinx.py", line 150, in build_sphinx
    site_map_str = yaml.dump(site_map.as_json())
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/sphinx_external_toc/api.py", line 152, in as_json
    for k in sorted(self._docs)
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/sphinx_external_toc/api.py", line 152, in <dictcomp>
    for k in sorted(self._docs)
TypeError: asdict() got an unexpected keyword argument 'value_serializer'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tomas/anaconda3/envs/pisco/bin/jupyter-book", line 8, in <module>
    sys.exit(main())
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/jupyter_book/cli/main.py", line 317, in build
    result, builder, OUTPUT_PATH, build_type, PAGE_NAME, click.echo
  File "/home/tomas/anaconda3/envs/pisco/lib/python3.6/site-packages/jupyter_book/cli/main.py", line 516, in builder_specific_actions
    raise RuntimeError(_message_box(msg, color="red", doprint=False)) from result
RuntimeError: 
===============================================================================

There was an error in building your book. Look above for the cause.

===============================================================================

Any idea what is happening here?

welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

chrisjsewell commented 3 years ago

Heya what version of attrs do you have? The version requirements are specified here: https://github.com/executablebooks/sphinx-external-toc/blob/5f0cbdc568580875d5909a3de967c1963b7f858e/setup.cfg#L32

temuller commented 3 years ago

Hi! I installed the latest version of attrs and it worked! Thanks!