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

TypeError: startswith first arg must be str or a tuple of str, not WindowsPath #45

Closed
smarie opened this issue Apr 11, 2022 · 3 comments · Fixed by #46
Closed

TypeError: startswith first arg must be str or a tuple of str, not WindowsPath #45

smarie opened this issue Apr 11, 2022 · 3 comments · Fixed by #46

Comments

@smarie
Copy link
Owner

smarie commented Apr 11, 2022

This happens when we use the mkdocs serve mode:

  File "C:\(...)\mkdocs_gallery\plugin.py", line 352, in _callback
    if event.src_path.startswith(g):
TypeError: startswith first arg must be str or a tuple of str, not WindowsPath

Probably related to the last changes with the pathlib paths everywhere.

@mchaaler
Copy link
Contributor

Strange... I cannot reproduce the bug.
Does it happen when working on mkdocs-gallery documentation itself?

@mchaaler
Copy link
Contributor

Strange... I cannot reproduce the bug.
Does it happen when working on mkdocs-gallery documentation itself?

Yes I do. One needs to modify an example file, of course... 🤦

mchaaler added a commit to mchaaler/mkdocs-gallery that referenced this issue Apr 11, 2022
@smarie
Copy link
Owner Author

smarie commented Apr 12, 2022

Oops sorry, my issue description was not good enough, I should have stated the clear procedure for reproducing the issue..

mchaaler added a commit to mchaaler/mkdocs-gallery that referenced this issue Apr 13, 2022
@smarie smarie closed this as completed in #46 May 7, 2022
smarie added a commit that referenced this issue May 7, 2022
Fix 'mkdocs serve' bug - issue #45
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

Successfully merging a pull request may close this issue.

2 participants