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

Issue with self.css_files attributes? #277

Closed
vsoch opened this issue Aug 17, 2023 · 13 comments · Fixed by #278
Closed

Issue with self.css_files attributes? #277

vsoch opened this issue Aug 17, 2023 · 13 comments · Fixed by #278

Comments

@vsoch
Copy link

vsoch commented Aug 17, 2023

This might be a version issue, but I just hit this:

Exception occurred:
  File "/home/runner/.local/lib/python3.10/site-packages/sphinx_immaterial/__init__.py", line 90, in init_css_files
    self.css_files = [
AttributeError: can't set attribute 'css_files'
The full traceback has been saved in /tmp/sphinx-err-hu_d8fkw.log, if you want to report the issue to the developers.

Is it related to Python version or immaterial version? I'm not currently pinning anything. Thank you (and sorry for always opening bugs, I am terrible 😆 )

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

If it is a version issue, then it would be useful to know what versions of python, sphinx, and sphinx-immaterial you are using. I suspect this is a Sphinx version problem, but I haven't looked into it yet.

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

It looks like Sphinx v7.2.0 changed the StandaloneHTMLBuilder.css_files into a "private" member StandaloneHTMLBuilder._css_files in sphinx-doc/sphinx#11582.

@vsoch
Copy link
Author

vsoch commented Aug 18, 2023

ah so should I pin one version below that for the time being?

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

I haven't done any testing (to reproduce) yet. For now, you can try pinning to sphinx<7.2. Please report back if that succeeds or not.

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

I can confirm that sphinx<7.2 works...

In testing my fixes, I've run into some other issues about sphinx v7.2+ that will have to also be addressed in the upcoming PR:

@vsoch
Copy link
Author

vsoch commented Aug 18, 2023

The first error went away! But I think I might have hit the third error there?

writing output... 
building [html]: targets for 23 source files that are out of date
updating environment: [new config] 23 added, 0 changed, 0 removed

Sphinx parallel build error:
TypeError: _monkey_patch_python_parse_arglist.<locals>.parse_arglist() takes from 1 to 2 positional arguments but 3 were given
make: *** [Makefile:20: html] Error 2
Error: Process completed with exit code 2.

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

Please use sphinx-immaterial>=0.11.6 for that fix.

2bndy5 added a commit that referenced this issue Aug 18, 2023
fixes #277 along with other problems found with v7.2.0 changes.
2bndy5 added a commit that referenced this issue Aug 18, 2023
fixes #277 along with other problems found with v7.2.0 changes.
2bndy5 added a commit that referenced this issue Aug 18, 2023
fixes #277 along with other problems found with v7.2.0 changes.

exclude sphinx7 testing with py3.8 in CI
@vsoch
Copy link
Author

vsoch commented Aug 18, 2023

okay my build worked - https://github.com/flux-framework/flux-restful-api/actions/runs/5898442163/job/15999539187 - thanks for the help! I'll watch this issue for next steps.

@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

I have a working fix, but it needs to pass static analysis before we merge and release it. Thanks for reporting this and verifying the culprit was sphinx v7.2.0.

@vsoch
Copy link
Author

vsoch commented Aug 18, 2023

Thank you!!

2bndy5 added a commit that referenced this issue Aug 18, 2023
fixes #277 along with other problems found with v7.2.0 changes.

exclude sphinx7 testing with py3.8 in CI

type ignore changes for python v3.8
2bndy5 added a commit that referenced this issue Aug 18, 2023
fixes #277 along with other problems found with v7.2.0 changes.

exclude sphinx7 testing with py3.8 in CI

type ignore changes for python v3.8
@2bndy5 2bndy5 added the pending release has been resolved but is pending a new release label Aug 18, 2023
@2bndy5
Copy link
Collaborator

2bndy5 commented Aug 18, 2023

Just published sphinx-immaterial v0.11.7 which includes the fix for this.

@2bndy5 2bndy5 removed the pending release has been resolved but is pending a new release label Aug 18, 2023
@vsoch
Copy link
Author

vsoch commented Aug 18, 2023

You and @jbms are really too notch maintainers. Every time I’ve opened an issue! This is a great project and I’ll try to keep spreading the good word!

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