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

mkdocs-merge affected by setuptools moving to 70.2.0 #20

Closed
mzarucki opened this issue Jul 2, 2024 · 3 comments
Closed

mkdocs-merge affected by setuptools moving to 70.2.0 #20

mzarucki opened this issue Jul 2, 2024 · 3 comments

Comments

@mzarucki
Copy link

mzarucki commented Jul 2, 2024

Hi @ovasquez,

Suddenly mkdocs-merge stopped working for us:

Cloning into 'ps-instructions'...
$ mkdocs-merge run . ps-instructions
Attempting to merge site: ps-instructions
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs-merge", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/__main__.py", line 44, in run
    merge.run_merge(master_site, sites, unify_sites, print_func=click.echo)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/merge.py", line 35, in run_merge
    new_navs = merge_sites(sites, master_docs_root, unify_sites, print_func)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/merge.py", line 105, in merge_sites
    dir_util.copy_tree(old_site_docs, new_site_docs, update=1)
  File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dir_util.py", line 146, in copy_tree
    mkpath(dst, verbose=verbose)
  File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dir_util.py", line 82, in mkpath
    _path_created.add(abs_head)
AttributeError: 'dict' object has no attribute 'add'

https://gitlab.cern.ch/cms-tsg/fog/documentation/-/jobs/40713402

Could you please help us understand the underlying issue?

Thanks a lot.

Cheers,
Mateusz

@mzarucki mzarucki changed the title mkdocs_merge suddently not working (mkpath) mkdocs-merge suddently not working (mkpath) Jul 2, 2024
@mzarucki mzarucki changed the title mkdocs-merge suddently not working (mkpath) mkdocs-merge suddenly not working (mkpath) Jul 2, 2024
@mzarucki
Copy link
Author

mzarucki commented Jul 2, 2024

The issue stems from the fact that setuptools moved from 70.1.1 to 70.2.0: pypa/setuptools@v70.1.1...v70.2.0

@mzarucki mzarucki changed the title mkdocs-merge suddenly not working (mkpath) mkdocs-merge affected by setuptools moving to 70.2.0 Jul 2, 2024
@ovasquez
Copy link
Owner

ovasquez commented Jul 3, 2024

@mzarucki thanks for catching this! I'll investigate if only the update is necessary and publish a new version.

@ovasquez
Copy link
Owner

@mzarucki I have published version 0.9.0 which should fix the reported issue. I was able to reproduce the bug locally and with 0.9.0 the problem no longer happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants