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

Extension does not work with Sphinx 8.0.2 #890

Open
PierreMarchand20 opened this issue Sep 16, 2024 · 3 comments
Open

Extension does not work with Sphinx 8.0.2 #890

PierreMarchand20 opened this issue Sep 16, 2024 · 3 comments
Labels
bug Something isn't working triage Issues needing triage

Comments

@PierreMarchand20
Copy link

Expected behavior

Everything should work as it did with sphinx version 7.3.7.

Actual behavior

I get AttributeError: 'PosixPath' has no attribute 'decode' using sphinx 8.0.2 when saving file, and preview gives:
image

Log output

ERROR: sphinx-build failed
Traceback (most recent call last):
  File "/Users/pierremarchand/Partage/web/cpp_quickstart/.venv/lib/python3.12/site-packages/docutils/utils/__init__.py", line 354, in decode_path
    path = path.decode(sys.getfilesystemencoding(), 'strict')
           ^^^^^^^^^^^
  File "/Users/pierremarchand/Partage/web/cpp_quickstart/.venv/lib/python3.12/site-packages/sphinx/util/_pathlib.py", line 99, in __getattr__
    raise AttributeError(msg)
AttributeError: 'PosixPath' has no attribute 'decode'

(Optional) Settings from conf.py

No response

@PierreMarchand20 PierreMarchand20 added bug Something isn't working triage Issues needing triage labels Sep 16, 2024
@PierreMarchand20 PierreMarchand20 changed the title Extension do not work with Sphinx 8.0.2 Extension does not work with Sphinx 8.0.2 Sep 16, 2024
@alcarney
Copy link
Member

Thank you for the bug report!

Just checking which version of Esbonio are you using?
Unfortunately, the 0.x release is not going to get support for Sphinx v8 (unless someone wants to backport a fix, I'm happy to accept PRs like #837)

However, I think I've fixed this particular issue in #866 for the in-development 1.0 version. I'll try and get another pre-release out over the next week so that it can be tested.

@PierreMarchand20
Copy link
Author

I have the 0.11.0. I actually made it work: I used sphinx 7.3.7 in my virtual environment so everything worked. Then I switched back to sphinx 8.0.2 and it still works. My guess is that something is cached so that we do not call this particular function.

It is something I have not yet understood with Esbonio: where is the compiled project ? If I want to clean everything, can I ?

@alcarney
Copy link
Member

where is the compiled project ?

You can set the location using the esbonio.sphinx.buildDir option. By default however, the extension uses the workspace storage provided by VSCode. On my machine that is a location like /home/<username>/.config/Code/User/workspaceStorage/<hash>/swyddfa.esbonio/sphinx/

If I want to clean everything, can I ?

Sure, just delete the build folder and restart the server. There's also the esbonio.sphinx.forceFullBuild option which might be enough to clear the cached data.

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

No branches or pull requests

2 participants